Hi Guido, If there is also a one-to-many on the B side, you can do it in JDO 1.0:
SELECT this FROM B WHERE as.isEmpty().But if the relationship is only on the many side, you are correct that JDO 1.0 doesn't have a solution, but JDO 2.1 does:
SELECT this FROM B WHERE !(SELECT DISTINCT this FROM A WHERE b != null).contains(this)
The BNF should contain this use pattern. Regards, Craig On Oct 26, 2007, at 8:01 AM, [EMAIL PROTECTED] wrote:
There is an old query that it was not possible to express in JDOQL. Having A and B classes, with A.b being a many-to-0/1, the query is: "What are the Bs not referenced by any A ?". Does subquery address somehow this use-case too ? Guido
Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature
