Hibernate Result Set Different then SQL Result Set
Ankit V Agrawal
Greenhorn
Joined: Jan 27, 2012
Posts: 9
posted
0
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
SCJP 5.0, SCWCD 5.0
Ankit V Agrawal
Greenhorn
Joined: Jan 27, 2012
Posts: 9
posted
0
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