Persistence QL Problems
Hello,
i always used following syntax to create Query:
example:
Query q = em.createQuery("SELECT p FROM User p WHERE type = :type");
The object "User" is an @javax.persistence.Entity
there has been always code-completion in this case and the Object "User" was clickable.
but suddenly, from one day to the other, the User is displayed in red and shown as a error.
i guess, somehow i destroyed the ability to "understand" Entities withing Persistence QL.
is there a possibility to reset these special settings, without resetting all settings or reinstall intellij?
Attachment(s):
PersistenecQLProblem.gif
Please sign in to leave a comment.
Persistence.xml must be added as descriptor in JPA facet (it must be
present) and it should not have or it must map User by means of . You may also want to check that User.java imports @javax.persistence.Entity annotation correctly. The other cause of annotation mappings not working as you expect is that one of your orm.xml files contains ]]> tag.
Sam Razialruh wrote:
thank you! that was the perfect tip. i moved that file a long tim ago but didn't see the connection.