After trying for a while, I thought that I would try to make changes here.
I am trying to check if a person identifier exists in two tables, for one table it works like a charm, but if I try to check another table, I get the following error:
[Semantic error] row 0, column 268 next to 'owner FROM \ ... \ Entity \ Resource':
Error: invalid path. There must be a StateFieldPathExpression expression.
The trick is that I can only use one DQL query, and here is what I came up with (... not in a real query):
SELECT contact_person
FROM \\...\Entity\Person contact_person
WHERE NOT EXISTS (SELECT b.personId FROM \\...\Entity\Booking b WHERE b.personId = contact_person.id)
AND NOT EXISTS (SELECT r.owner FROM \\...\Entity\Resource r WHERE r.owner = contact_person.id)
source
share