-->
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: How to refresh the query?
PostPosted: Tue Apr 13, 2010 6:59 am 
Newbie

Joined: Sun Apr 11, 2010 7:22 am
Posts: 4
I have a problem. My query doesn't have the actual state of the database.

So...
I created my tables, I made some inserts and some search-queries. And all is alright, but, If a change a value in DB(directly, without using the java code), the search-query returns the old state. What should I do make this thing to work? :)


P.S. I noticed, If a make a insert (using the java code), when I run a search-query returns the actual state (including the changes made directly in DB)


Top
 Profile  
 
 Post subject: Re: How to refresh the query?
PostPosted: Wed Apr 14, 2010 5:00 am 
Beginner
Beginner

Joined: Fri Aug 24, 2007 9:47 am
Posts: 21
I think you are ommited to commit the transaction.
Else you can use session.flush();

_________________
recherche-programmeur.fr


Top
 Profile  
 
 Post subject: Re: How to refresh the query?
PostPosted: Wed Apr 14, 2010 1:30 pm 
Regular
Regular

Joined: Mon Jan 05, 2009 6:42 pm
Posts: 99
Location: IL
I guess you meant (and need) to refresh the State of the entity(or entities) that are involved in the query and not the query itself.


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.