Incorrect EJB-QL validation

This query is correct isn't it?
Object countObject = entityManager.createQuery("select count(*) from Project").getSingleResult();
Idea marks the "*" in red with error message "identifier expected".

Another problem:
Query query = sourceEntityManager.createQuery("from Project where _no != '1'");
Idea says "select expected".

Or am I falling for some incompatibilities between Hibernate's entity manager and
the EJB 3.0 specification?

4 comments
Comment actions Permalink

Both queries are invalid due to the Persistence QL spec

"Stephen Kelvin" <mail@gremlin.info> wrote in message
news:e6bkkr$m80$1@is.intellij.net...

This query is correct isn't it?
Object countObject = entityManager.createQuery("select count(*)
from Project").getSingleResult();
Idea marks the "*" in red with error message "identifier expected".

>

Another problem:
Query query = sourceEntityManager.createQuery("from Project where
_no != '1'");
Idea says "select expected".

>

Or am I falling for some incompatibilities between Hibernate's entity
manager and
the EJB 3.0 specification?



0
Comment actions Permalink

Is there a new EAP coming soon? I can't even open up any entity classes, or edit any of the @NamedQuery queries in them, no edit action works, so I can't even delete/cut/copy paste. I've autofiled reports, but it's rather frustrating that I can't even edit a file, can't remember the last time I had this sort of brokenness in IDEA when editing simple java sources!

0
Comment actions Permalink

Just to clarify, the file does open, but the RCOD pops up with a class cast exception, I've autofiled it a number of times.

0
Comment actions Permalink

This exception is fixed now.

"Hani Suleiman" <hani@formicary.net> wrote in message
news:12586780.1149865685990.JavaMail.itn@is.intellij.net...

Is there a new EAP coming soon? I can't even open up any entity classes,
or edit any of the @NamedQuery queries in them, no edit action works, so I
can't even delete/cut/copy paste. I've autofiled reports, but it's rather
frustrating that I can't even edit a file, can't remember the last time I
had this sort of brokenness in IDEA when editing simple java sources!



0

Please sign in to leave a comment.