-->
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: Generating Equals Builder
PostPosted: Mon May 16, 2005 12:03 pm 
Newbie

Joined: Mon May 16, 2005 11:55 am
Posts: 11
I'm using hbm2java to generate java source from hbm files.
It generates toString methods using ToStringBuilder, but don't generates equals method.
I need equals method in my objects, but I can't see how can ask this generation to hbm2java.
I'm not sure, but until some days ago there are equals methods... but I don't change anything... is it possible? I don't understand...

Who can tell me how to invoke hbm2java to generate equals method too?

thank for anyone can help me.
bye


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 16, 2005 1:39 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you did not change anything you say, not even to a different version of the tools or ?

hbm2java have not for a while generated equals without you placing meta attribute use-in-equals in the mapping files.

That was done because an equals based on the id is almost in any case flawed (look at the wiki for the equals hashcode discussion)

_________________
Max
Don't forget to rate


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.