1 of 1 people found this helpful
You're query isn't quite right: I think you might have intended to use a LEFT OUTER JOIN.
The problem is that the 3.x query engine cannot easily implement such null checks on joins, which is why MODE-2151 will be fixed only in 4.0.
The workaround is to use a property on the parent to specify whether it has the child you are looking for. In fact, even in other JCR implementations this is the recommended practice, since it turns a two-way join into a non-join criteria.