[Dbix-class] Problem prefetching more than one relation
Matt S Trout
dbix-class at trout.me.uk
Wed Nov 8 22:29:04 GMT 2006
Jon Warbrick wrote:
> Am I limited to pre-fetching only one has_many relation?
> $db->resultset("Person")->search
> ({ "me.uid" => 'fjc55' },
> { prefetch => [qw/title mail/]})->single
At the same level, like that, for the moment yes.
A chain of has_manys is fine.
For the record, I've found it's usually not very efficient to do that anyway
for large resultsets because of the cross product effect, and fairly
irrelevant for small ones.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list