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

Matt S Trout dbix-class at trout.me.uk
Mon May 7 14:51:29 GMT 2007


On Fri, May 04, 2007 at 11:03:10PM +0930, Jon Schutz wrote:
> I think that would work, yes.  In which case using search_literal()
> would get around the need for the table sub-select.  A good suggestion,
> thankyou.
> 
> 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.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
Shadowcat Systems Ltd.   Contact mst (at) shadowcatsystems.co.uk for a quote
                                          http://www.shadowcatsystems.co.uk/ 



More information about the Dbix-class mailing list