I have a Java entity class with the following named query that compiles and runs correctly. I have recently upgraded my Eclipse to Luna and am see the following 2 warnings:
The left and right expressions type must be of the same type.
The state field path 'ar.lifecycle.id' cannot be resolved to a valid type.
Here is the query:
@NamedQuery(name = "ClazzImpl.findDescendants", query = "SELECT DISTINCT cl FROM ClazzImpl cl JOIN cl.ancestorReference ar WHERE (ar.lifecycle.id = ?1) AND (ar.referenceStrategy = 'LATEST_EFFECTIVE')"), })
It's as if the the query analysis doesn't recognize the target entity type that "ar" represents. If the problem is with the syntax of my query, please let me know. Thanks.