[Dbix-class] modifying join condition in search
Jess Robinson
castaway at desert-island.me.uk
Fri Jul 20 13:15:53 GMT 2007
On Thu, 19 Jul 2007, Jon Schutz wrote:
>
>> Why do you need it to be in the join? whats the difference between:
>>
>> ph_topics me LEFT JOIN ph_watchers watchers ON ( watchers.topic_id =
>> me.id AND watchers.user_id = ? )
>>
>> and
>>
>> ph_topics me LEFT JOIN ph_watchers watchers ON ( watchers.topic_id =
>> me.id ) WHERE watchers.user_id = 5
>>
WHERE watchers.user_id = 5 OR watchers.user_id IS NULL ->
search({ 'watchers.user_id' => [5, undef]} ..
Jess
More information about the Dbix-class
mailing list