-->
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: First row of the table is repeated in createquery result....
PostPosted: Tue May 02, 2006 12:35 am 
Beginner
Beginner

Joined: Thu Apr 20, 2006 3:44 am
Posts: 32
I am facing a weired problem....

I am running a query "from Customer"...

List lst = session.CreateQuery("from customer").list;

when I get a list object to the above result, list contains only first row repated to the lenght of rows in table, i.e, if table has 30 rows, first row is repeated in above list(lst object) 30 times.........

Any clue regarding this

Sudhir


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 03, 2006 11:58 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
It could have something to do with joins from Customer, so turning on show_sql might help. However the most likely explanation is a poorly-implemented hashCode method. Do you have something silly like "public int hashCode() { return 1; }"?

_________________
Code tags are your friend. Know them and use them.


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.