I've recently been converting some HQL expressions into @NamedQuery (the JPA kind).
Here's an example:
SELECT c.name FROM Connection AS c WHERE c.key = :key AND c.validTo = (SELECT MAX(c2.validTo) FROM Connection AS c2 WHERE c2.key = :key )
This query works as it should before and after the conversion but the editor indicates the following error:
"The left and right expressions type must be of the same type".
If I remove the MAX() around c2.validTo the message goes away (and breaks my query of course). Perhaps that fact can help locate the error?
Can you provide a sample with entities code also?
Created attachment 139417 [details]
Simple EE7 project with single entity containing single self-joining query
Simple EE7 project with single entity containing single self-joining query.
thanks, nice sample
depends on https://bugs.eclipse.org/bugs/show_bug.cgi?id=416546