Hibernate & HQL

Does the Hibernate Facet support annotated classes? (EAP 10361)

I've configured the Hibernate Facet in my project settings to use a datasource (which if I access via the DataSources tab and execute plain SQL works fine), Ive tried restarting, but the HQL/Hibernate doesnt seem to be picking up my annotated classes - is this the reason why HQL console always returns "Query not prepared" and why I can't see any Entity classes listed in the "persistence" tab(annotated classes, not specified in the hbm.xml)?


Comment actions Permalink

I tested this on a Mac and its working fine for JPA Facets, not for Hibernate ones

Comment actions Permalink

Hi Nick!
Could You please provide or point me some howto/demo/tutorial how to use JPA with HQL Console.

I have found http://www.jetbrains.com/idea/features/java_hibernate.html and http://blogs.jetbrains.com/idea/2009/03/hql-console-with-pure-jpa-facets/ but there is no demo how to make it working.

I have module with annotated entities classes it has JPA Facet - JPA Configuraction file - persistenece.xml with persistenece unit which is mapped to an existing data source via JPA facet settings, transaction type is JTA and jta-data-source is also set to some JNDI name.

Then I open HQL console and try:
select c from Customers c

I get in output window
> select c from Customers c
Session is not created
Query is not prepared

Thx in advance.


Please sign in to leave a comment.