[hibernate-dev] Database Refresh Issue(Save and query)
sridhar veerappan
sriasarch at gmail.com
Tue May 12 01:13:41 EDT 2009
Hi,
I am using hibernate 1.2, when I save the data it is getting save in the
database(save) , but immediatly i am(query) checking for the updated data, I
am not getting the refreshed data, getting the old data. After 3-10 seconds,
it is getting the new/updated data .
How to solve this issue.
Code snippet:
Save:
sess = HibernateConfigurator.getSessionFactory().openSession();
sess.saveOrUpdate(p_obj);
sess.flush();
Query:
sess = HibernateConfigurator.getSessionFactory().openSession();
List result = sess.find(p_query);
Thanks in Advance
Sridhar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-dev/attachments/20090512/dce85b0f/attachment.html
More information about the hibernate-dev
mailing list