[Dbix-class] I get only one in a one to one / SOLVED

Miguel Barco miguelelelele at yahoo.es
Thu Jan 12 09:21:14 GMT 2012


Here it is!!=A0 I do not need Prefetch, but a simple Join

In the doc kindly linked by Jason Galea, scrolling up a little in the page,=
 it states clearly that Prefetch is used to retrieve "Whole related objects=
", so to get just a "Subset of related fields" a Join is enough.

Apart from +select +as, it is working here with +column

Thank you all:
Migue




________________________________
 De: Jason Galea <lists at eightdegrees.com.au>
Para: Miguel Barco <miguelelelele at yahoo.es>; DBIx::Class user and developer=
 list <dbix-class at lists.scsys.co.uk> =

Enviado: martes 10 de enero de 2012 14:12
Asunto: Re: [Dbix-class] I get only one in a one to one
 =


AFAIK you can't use the columns attribute for what you are trying to achiev=
e, you'll need +select and +as.. see here..

https://metacpan.org/module/DBIx::Class::Manual::Joining#Subset-of-related-=
fields

cheers,

J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120112/c35=
6b3ce/attachment.htm


More information about the DBIx-Class mailing list