cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramiro Aparicio <>
Subject Entities without relation
Date Wed, 30 Jan 2013 17:01:44 GMT

An easy question, I want to know all elements of table A that does NOT 
have a relationship with table B
A->B 1:N so A id is stored on B

In plain SQL I am using:
"select * from A where idA not in (select idA from B);"
It is not really nice, but works

But using a Expressions seems a lot harder, I don't find anything like 
that, sure we have notInExp but I don't see a way to set the path to the 
entity it self, and having to extract all idA to use it with notInDbExp 
seems very ugly (if idA is exposed on A).

I know I can go and just use plain SQL, just for knowledge I would want 
to now if something as "simple" is impossible to be queried using 

Ramiro Aparicio

View raw message