Prefetch is really smart, and in the newer versions of DBIx::Class is even 
capable of taking multiple relations without the risk of duplicating rows.

  
http://search.cpan.org/~frew/DBIx-Class-0.08205/lib/DBIx/Class/ResultSet.pm#prefetch

Basically as I understood the problem, you want to fetch a row, and the 
"possible" relation, as a LEFT JOIN would provide. But you always want the main 
relation to return a value even if the join is NULL.

Prefetch will do that without complicated use cases.

Francisco


On Jun 18, 2013, at 11:19 AM, Stephen Shorrock <[email protected]> 
wrote:

> I think Robert has cracked it, but why prefetch?
> 
> 

Francisco Obispo 
Director of Applications and Services - ISC
email: [email protected]
Phone: +1 650 423 1374 || INOC-DBA *3557* NOC
PGP KeyID = B38DB1BE


_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to