-->
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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Result Set Different then SQL Result Set
PostPosted: Fri Jan 27, 2012 11:58 am 
Newbie

Joined: Fri Jan 27, 2012 11:54 am
Posts: 2
Hi,

I'm running a query to fetch some 100 records from the database. The Database is SQL Server 2008.
When I'm running the query from the MS SQL Management Studio it is returning the correct result set.
But when I'm running it thru hibernate the result set is different.

I have tried to print the query and the query is being printed exactly as what I want it to be. Still the result set is different when I iterate thru the list and print it.

Also I have checked that the my code is connecting to the correct data base.

Any idea if hibernate does some kind of caching issues ? Has anybody faced this kind of problem before ?
Any help would be appreciated.

Regards,
Ank


Top
 Profile  
 
 Post subject: Re: Hibernate Result Set Different then SQL Result Set
PostPosted: Fri Jan 27, 2012 3:11 pm 
Newbie

Joined: Fri Jan 27, 2012 11:54 am
Posts: 2
I tried to test the query thru JDBC and that is also returning the right result. So it has got to do something with hibernate.

2 Records fetched
Transaction ID From Hibernate :: 3062
Transaction ID From Hibernate :: 3062

Transaction ID From JDBC :: 3062
Transaction ID From JDBC :: 3063

Any ideas what is going wrong ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.