HQL « Cache « JPA Q&A





1. HQL with convert timezone    stackoverflow.com

I have the following query in SQL

Select 
count(*) as cnt, 
DATE_FORMAT(CONVERT_TZ(wrdTrk.createdOnGMTDate,'+00:00',:zone),'%Y-%m-%d') as dat
 from
 t_twitter_tracking wrdTrk 
where 
wrdTrk.word like (:word) and wrdTrk.createdOnGMTDate  between  :stDate and :endDate  group by ...

2. Does HQL update clear 2nd level cache?    stackoverflow.com

Native queries are clearing the 2nd level cache entries. An answer from the hibernate forum that is 7 years old says that HQL update queries also clear the 2nd level cache. ...

3. HQL and session level cache    forum.hibernate.org

Hi all, While working in hibernate session level cache and HQL i came across an inconsistent behavior I have tried the following scenarios : Case 1 Query q = s.createQuery("select new sample(s.a, s.b) from sample s").setCacheable(true); List l = q.list(); sample s1 = (sample)s.get(sample.class, "abcd"); System.out.println(s1.getB()); Case 2 Query q = s.createQuery("from sample s").setCacheable(true); List l = q.list(); sample s1 = ...

5. HQL and second level cache    forum.hibernate.org

6. HQL problem (maybe related to hibernate cache)    forum.hibernate.org

Hi Folks. I have a problem with an application that uses the Hibernate and I need some help. I have a HQL that I execute to list a complex object (with Sets) and displays it in a grid. When I update one of the objects that are returned by this HQL, and execute thes query again, the hibernate got lost and ...

7. Objects fetched through HQL, NOT getting cached    forum.hibernate.org

......

8. Second level cache and HQL    forum.hibernate.org

Hello, If I use second level cache to preload whole table, will it be used by extrnalized HQL query on that table? I have an HQL query which is executed repeatedly on a table which is rather static. What is the best way to handle it for better performance? Thanks a lot, --MG

9. HQL and L2 cache clarification    forum.hibernate.org

We wish to turn on the L2 cache on a system which has numerous legacy SQL queries. This raises the problem of stale data in the cache or reading data from the db that has been changed in the cache but not yet flushed. There are a number of options available, but I was curious to know about exactly how HQL ...