-->
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: Problem with set
PostPosted: Fri Jan 11, 2008 3:44 pm 
Newbie

Joined: Fri Jan 11, 2008 3:25 pm
Posts: 7
Hello,

I have problem with hibernate becacuse I have to check an set contains an object but the method set.contains(object) always return false however the object is in the set. I check the hashcode the object and the object that is in the set and the hashcodes are equals.

The object have equals() and hashcode()

Anybody can help me?


Top
 Profile  
 
 Post subject: Re: Problem with set
PostPosted: Fri Jan 11, 2008 11:45 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
dcharline9 wrote:
The object have equals() and hashcode()

Anybody can help me?


Show me what the equals method looks like. Do you access properties directly or with their accessor methods? You will need to access properties with accessors because of CGLIB byte code enhancers. I had a similar problem at some point.


Farzad-


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.