Stephan Szabo wrote: > If we have an email row with id 1 and a chunk row with id 10 and > email 1 and no other rows in either table, my understanding is that > > > >>>>> FROM email me > > >>>>> LEFT JOIN chunk chunks ON chunks.email=me.id > > >>>>> LEFT JOIN chunk chunks_2 ON chunks_2.email=me.id > > gives you a result like > (me.id=1, chunks.email=1, chunks.id = 10, chunks_2.email=1, > chunks_2.id=10) > and then a WHERE clause like your proposed would filter the row out, > while the intended behavior is that you'd get a row like (me.id=1, > chunks.email=1, chunks.id = 10, chunks_2.email=null, > chunks_2.email=null).
Exactly. "chunks.id!=chunks_2.id" servers completely different purposes if it is either in a LEFT JOIN or else in the WHERE part. -- Bernhard Graf _______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/ Searchable Archive: http://www.mail-archive.com/dbix-class@lists.rawmode.org/