Hello,
I've the same problem, and I think the only solution to resolve it is to
modify the code. DBIC (i think) assumes that join conditions are all
based on the '=' operator. For DBMS, join condition is an expression
resulting in a value of type boolean.
Anthony
Le lundi 27 novembre 2006 à 09:05 +0100, Bernhard Graf a écrit :
> Matt S Trout wrote:
>
> > > SELECT me.title
> > > FROM email me
> > > LEFT JOIN chunk chunks ON chunks.email=me.id
> > > LEFT JOIN chunk chunks_2 ON chunks_2.email=me.id AND
> > > chunks.id!=chunks_2.id
> >
> > why not just join => [ qw/chunks chunks/ ] and add { 'chunks.id' =>
> > \"!= chunks_2.id" } to the where?
>
> Thanks for the answer, but this must be in the JOIN ... (ON ...) part to
> work correctly.
>
> I tried to put it into the from-attribute
>
> $attribute->{from} = [
> {me => 'email', -join_type => 'left'},
> [
> {chunks_2 => 'chunk'},
> {'chunks_2.email' => 'me.id', 'chunks.id' => \'!=chunks_2.id'}
> ]
> ];
>
> and failed with a similar error as before:
>
> FROM email me JOIN chunck chunks_2 ON ( chunks.id = SCALAR(0x2e06800)...
>
> moreover the -join_type setting is ignored.
--
Anthony Hinsinger <[EMAIL PROTECTED]>
_______________________________________________
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/[email protected]/