Re: [RDBO] negative relationships?

2006-03-25 Thread Michael Lackhoff
Hello John, I did some more testing, got it working but still don't understand everything. This should work: $vendors = Vendor::Manager-get_vendors( with_objects = [ 'products' ], query= [ 'products.vendor_id' = undef ]); Yes, this works fine. That

Re: [RDBO] negative relationships?

2006-03-25 Thread John Siracusa
On 3/25/06 10:44 AM, Michael Lackhoff wrote: $subselect = '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

Re: [RDBO] negative relationships?

2006-03-25 Thread Michael Lackhoff
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

Re: [RDBO] negative relationships?

2006-03-24 Thread John Siracusa
On 3/24/06, Michael Lackhoff [EMAIL PROTECTED] wrote: Say, I have two tables: vendors and products. Now I want a list of all the vendors that have no products yet. This can be seen from the products table if there are no records with the vendor_id of the vendor in question. Is this possible

Re: [RDBO] negative relationships?

2006-03-24 Thread John Siracusa
Ha, Cees is a faster typist I guess... :) -John --- 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