Just for the record, I found it.

> >>       'NOT EXISTS (SELECT * FROM products p WHERE p.vendor_id = id)';
> >> 
> >>     $vendors = Vendor::Manager->get_vendors(clauses => [ $subselect  ]);
> > 
> > This doesn't work for me (result list is empty but should have two
> > entries). If I change the $subselect to Cees'
> > 'id NOT IN (SELECT vendor_id FROM products)'
> > it works. Is this perhaps a limitation of SQLite?
> 
> Yeah, maybe.  I tested it in Pg, IIRC.  Maybe SQLite (or your version of
> SQLite) doesn't like that syntax.  You can always try setting
> $Rose::DB::Object::Manager::Debug = 1 to see the actual SQL generated, then
> run that SQL manually against your SQLite database.  They'll tell you for
> sure what the problem is.

Both tables have an 'id' column, so I had to use 'vendor.id', instead 
of just 'id'.

Michael



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to