• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate caching problem

 
Shifali Rana
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have problem whenever I truncate some of the tables from my database.
I used hql to show tables data and it still shows the old data of those tables But, when i restart my server it does not show the old data.
Is hibernate is caching my old data and not updating the objects?
Or
Is the table truncation outside through database is not reflecting to the application?


Thanks
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is possible if you are using 2nd level cache.
 
Shifali Rana
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply

I am new to hibernate and i don't know much about hibernate caching strategy. Can you please explain this first and second level caching So, that i can understand what is happening actually in the system.
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please refer to Hibernate documentation


http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#performance-cache
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic