/me wrote:
> Anthony Hinsinger wrote:
> > { table1.key => { '!=' => table2.key } }
> Anthony, you are right.
Sorry Anthony, I must correct myself - you are not right.
The above form indeed fails to build a working SQL query, but if it
would, it would probably not do what you want, because "table2.key"
would be inserted verbatim:
table1.key != "table2.key"
> For the moment { 'table1.key' => \'!=table2.key' } does the job.
So this is actually the only valid way to compare two fields in the
from-attribute.
The question still is how to modify the code to support constant values
to express something like
{ 'table1.key' => \'!=table2.key', 'table1.maximum => {'<', 23}}
that should result in
table1.key != table2.key AND table1.maximum < "23"
--
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/[email protected]/