Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 104341
Status: rejected
Priority: 0/
Queue: DBIx-Class

People
Owner: Nobody in particular
Requestors: kes-kes [...] yandex.ru
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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.
On Mon May 11 10:09:58 2015, kes-kes@yandex.ru wrote: Show quoted text
> 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} ) >
As with your previous request https://rt.cpan.org/Ticket/Display.html?id=103860, this is also a request for extra API sugar. Such additions do not belong in the DBIx::Class distribution, but need to live either as standalone dists or as additions to say https://metacpan.org/pod/DBIx::Class::Helper::ResultSet::Shortcut Therefore I am closing this ticket as "wontimplment". Cheers!