Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]Hibernate version:[/b] 3.2.4sp1, EntityManager3.3.1, Annotations3.3.0
[b]Mapping documents:[/b] N/A
[b]Code between sessionFactory.openSession() and session.close():[/b] N/A
[b]Full stack trace of any exception that occurs:[/b] N/A
[b]Name and version of the database you are using:[/b] N/A
[b]The generated SQL (show_sql=true):[/b] N/A
[b]Debug level Hibernate log excerpt:[/b] N/A
Problems with Session and transaction handling? No.
Read this:
http://hibernate.org/42.html
Greetings,
I'm trying to configure Query Cache for Hibernate JPA applications.
I configured in hibernate.cfg.xml :
- hibernate.cache.use_query_cache true
From Hibernate3 Reference Chapter 19.4, I still need
- q.setCacheable(true)
to enable query cache on query q, where the method setCacheable() is available only in org.hibernate.Query but not javax.persistence.Query (and org.hibernate.Query also does not extend javax.persistence.Query).
In this case, how can we enable Hibernate Query Cache for JPA Queries in JPA applications? Or Hibernate Query Cache simply cannot be enabled in JPA applications, and we only use 2nd level cache on entities and collections?
Thanks and best regards.