-->
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.  [ 1 post ] 
Author Message
 Post subject: Random result from hibernate query.list()
PostPosted: Tue May 17, 2005 9:51 pm 
Newbie

Joined: Tue May 17, 2005 9:38 pm
Posts: 1
Hi,
I have some trouble with hiberante fetching query. It is a very basic hql but it gets result randomly.

Following is my code,

Query query = session.createQuery("from Transaction where transactionId=:id");
query.setParameter("id", transactionId)
List list = query.list();

I am sure data with transactionId is in database.
The weird thing is the list I got works randomly. I have 50% chance to get a empty and another 50% chance to get correct data.
It only happens after I just inserted this row before close a session.

Anyone had similar problem and cue to slove it?


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

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.