Re: [Dbix-class] Left join with an extra condition

2009-10-24 Thread Peter Rabbitson
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

Re: [Dbix-class] Left join with an extra condition

2009-10-24 Thread Bill Moseley
On Sat, Oct 24, 2009 at 5:59 AM, Peter Rabbitson rabbit+d...@rabbit.usrabbit%2bd...@rabbit.us wrote: 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.* (nice how Gmail turned those columns

Re: [Dbix-class] Left join with an extra condition

2009-10-24 Thread Wallace Reis
On 24/10/2009, at 11:48, Bill Moseley wrote: Can the virtual view inherit from the user? That is, can I convince DBIC that the object returned is a real user object so I can update the object and have it written to storage? The cookbook just says that the view cannot be operated on.

Re: [Dbix-class] Left join with an extra condition

2009-10-24 Thread Bill Moseley
On Sat, Oct 24, 2009 at 8:24 AM, Wallace Reis wall...@reis.org.br wrote: On 24/10/2009, at 11:48, Bill Moseley wrote: Can the virtual view inherit from the user? That is, can I convince DBIC that the object returned is a real user object so I can update the object and have it written to

Re: [Dbix-class] Left join with an extra condition

2009-10-24 Thread Darren Duncan
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 http://o.id) from user u left outer join job j on j.user = u.id http://u.id AND J.JOB_TYPE = 6 where u.location =