-->
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: SortedSet contains duplicate values in Hibernate 2.1.7
PostPosted: Sun Jan 28, 2007 12:11 pm 
Beginner
Beginner

Joined: Tue Mar 15, 2005 1:26 am
Posts: 20
We have a project need to sort details for one master record with JDK 1.3.
The details is mapping to Set with sort="natural".

We later find a problem in it. When getting details from master data, and then add one of the detail record(saved) to the Set, the set size been increased.

When I add debuging code to compare two elements in Set using "==", it return "true". The Set class is "net.sf.hibernate.collection.SortedSet".

What's the problem? I think Set can contains one object only once. But it seems not.

I have remove all sort="natural" in mapping files. And add a new SortIterateTag based on Struts IterateTag. Because I think "sort" is a concept of "view" for us, not a model level concept.

But I still can't understand why the Set can contains same object twice?

_________________
OR maping? not familar. seems easy select, hard delete/update


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.