IntelliJ - Persistence QL Queries error-check over hibernate queries
I have hibernate session query using a class recognized by hibernate. This query runs smoothly but is somehow recognized by IntelliJ IDEA as a Persistence QL Queries error - "Cant resolve symbol"
I know how to disable Persistence QL Queries error-check in IntelliJ inspection options开发者_高级运维, but is there a way to avoid the error in some other way?
(I'm using IntelliJ IDEA 9.0.3)
It seems IDEA doesn't recognize which or what Descriptor you are using. Check Project Structure -> Facets -> Hibernate. You should have found a cfg.xml file in Descriptors. If you are using package scanning through spring session factory definition,you should have found a session factory bean. If neither of them exists,you may add one.
- Check Project Structure -> Facets -> Hibernate 2- if you have not a cfg.xml file, you should add new one.
Check if you have the @Entity annotation in your model
精彩评论