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.