On Thu, Jan 12, 2012 at 7:21 PM, Miguel Barco <[email protected]>wrote:
> Here it is!! 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 > the difference there is that it'll do extra queries to get the related columns. With +select +as you can get it all in one query. glad you got it working though! cheers, J > > Thank you all: > Migue > > > ------------------------------ > *De:* Jason Galea <[email protected]> > *Para:* Miguel Barco <[email protected]>; DBIx::Class user and > developer list <[email protected]> > *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 > achieve, 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/[email protected] >
_______________________________________________ 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/[email protected]
