On Fri, Oct 23, 2009 at 12:45:01PM -0700, Bill Moseley wrote:
> Looking for how to add an addition condition on a join.  Here's an example
> of the query with the extra condition in CAPS
> 
> select u.* <http://p.id/>, count(o.id)
> from user u
> left outer join job j on   j.user = u.id AND J.JOB_TYPE = 6
> where u.location  = ?
> group by u.*
> 

You can not do this natively yet. Your only option is a virtual view
resultset as described here:
http://search.cpan.org/~ribasushi/DBIx-Class-0.08112/lib/DBIx/Class/ResultSource/View.pm

_______________________________________________
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]

Reply via email to