Subject: | FR (feature request): ease way to init relationship ID |
I have tables in next relationship
http://stackoverflow.com/questions/30108820/why-i-get-join-instead-of-left-join-for-has-many-relationship-in-dbixcla
I can take all ip addresses from THIS locality by:
$schema->resultset('Pool::Address_view')
->search({ 'me.locality_id' => $order{locality_id} })
But I can do mistake in column names while "me.locality_id'
It will be handy to set 'locality_id' by:
$schema->resultset('Pool::Address_view')
->locality( $order{locality_id} )
It will be not a problem, because of I have at ResultSet::Pool::Addresses_view next relation:
__PACKAGE__->belongs_to( locality => 'SafeVPN::DB::Result::Locality', 'locality_id');
I also can: ...->locality( ID1, [[ID2,] ...]) If primary key is multicolumn.