Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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"

Persistence QL Queries error

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)

like image 487
Ido.Co Avatar asked Aug 30 '11 11:08

Ido.Co


1 Answers

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.

like image 156
Daniel Avatar answered Sep 21 '22 23:09

Daniel