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

Miguel Barco miguelelelele at yahoo.es
Thu Jan 12 09:47:55 GMT 2012


Ooooooops, you are right. The whole story started with a Join. Then I was b=
lind with the Prefetch, so I thought your response was a step back. Sorry, =
it was the perfect answer=A0 :-)

Gracias:
Migue



________________________________
 De: Jorge Gonzalez <jorge.gonzalez at daikon.es>
Para: dbix-class at lists.scsys.co.uk =

Enviado: jueves 12 de enero de 2012 10:27
Asunto: Re: [Dbix-class] I get only one in a one to one / SOLVED
 =


That's _exactly_ what I told you on Jan 9th, see the list archives...

:-)
J.


El 12/01/12 10:21, Miguel Barco escribi=F3: =

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 object=
s", 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 develope=
r 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 achie=
ve, you'll need +select and +as.. see here.. =

>
>
>https://metacpan.org/module/DBIx::Class::Manual::Joining#Subset-of-related=
-fields
>
>
>cheers,
>
>
>J
>
>
>
>
>
>
>_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc=
.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive=
: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co=
.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20120112/a68=
79621/attachment-0001.htm


More information about the DBIx-Class mailing list