[Dbix-class] Use of sub-select in joins

Jon Schutz jon+dbix at youramigo.com
Tue May 8 01:21:43 GMT 2007


On Mon, 2007-05-07 at 14:51 +0100, Matt S Trout wrote:

> > Though I am still interested in the other half of the problem - if I
> > _have_ to do a table sub-select in DBIx::Class, is the way I laid out
> > the "right" way...?
> 
> No, not at all.
> 
> The way you discounted as impossible is the right way.
> 
> Add ? for the bind variables and pass bind => \@bind to the rs - see
> 
> http://dev.catalyst.perl.org/trac/bast/changeset/3263
> 
> for a cookbook example on how to implement it.
> 

Thankyou Matt, that's an excellent addition to the Cookbook, and
precisely what I was looking for.

In case you were not aware, the 'bind' attribute does not appear to be
documented elsewhere, e.g. in the 'Attributes' section of
DBIx::Class::ResultSet.

-- 

Jon




More information about the Dbix-class mailing list