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
2 comments
Comment actions Permalink

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:

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?

--- Original message URL:
http://www.jetbrains.net/devnet/message/5236458#5236458


------------------------------------------------------------------------

0
Comment actions Permalink

thank you! that was the perfect tip. i moved that file a long tim ago but didn't see the connection.

0

Please sign in to leave a comment.