-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Data hasn't been saved in database
PostPosted: Thu Sep 16, 2010 6:42 am 
Newbie

Joined: Thu Sep 16, 2010 6:14 am
Posts: 1
I'm facing an issue that really caused me headache. That is, when I update or create new object, the return result of HQL execution telling me that it has been successful ( I also flushed the session ). However, when I retrieve the object, system returns me no value.

Summary:
1/ Execute update of insert( flushes session already ) : return success result
2/ Retrieve the data : not found
3/ After a while, Retrieve the data: found

Can someone please explain or guide me how to solve this case?

Thank you very much,

Trang Doan.


Top
 Profile  
 
 Post subject: Re: Data hasn't been saved in database
PostPosted: Fri Sep 24, 2010 10:14 am 
Regular
Regular

Joined: Wed Jun 20, 2007 1:53 am
Posts: 75
post your code between session open and close


Top
 Profile  
 
 Post subject: Re: Data hasn't been saved in database
PostPosted: Fri Sep 24, 2010 9:40 pm 
Newbie

Joined: Tue Jul 20, 2010 1:53 am
Posts: 18
session.commit(); - - ->after only your transaction is committed to Database Software and to save DB.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.