I worked around this by using a case when which returns true if the predicate is true and else returns false. The grammer does not seem to support this, but I don't really see a reason to do so since you can workaround in a JPA compliant way.