[hibernate-dev] Database Refresh Issue(Save and query)

Chris Bredesen cbredesen at redhat.com
Tue May 12 09:47:48 EDT 2009


Please post this issue on the user forum.  This list is for discussion 
about the development of Hibernate itself.

-Chris

sridhar veerappan wrote:
> 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
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev



More information about the hibernate-dev mailing list