retrieve from database where association is empty

I am intentionally creating a bunch of orphan entities and want to later retrieve them later. How do I go about doing it? XPath constraint does not take empty argument for association. Association does not show up in a decision box expression. Is there some other clever way?
2 answers

You can use a not in your XPath.

For example, consider this relationship...

If I want to retrieve all the A’s without an association to B in MyFirstModule. I would retrieve MyFirstModule.A with the XPath constraint of 


Hope this helps.


You can use [not(Entity1_Entity2/Entity2)]. This finds all object of Entity1 that do not have an association to an object of Entity2.


Note that a not() operator over an association is a relatively heavy operation for a database.