-->
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: hashcode equals / schema update
PostPosted: Mon Oct 24, 2005 4:26 am 
Beginner
Beginner

Joined: Fri Nov 19, 2004 11:38 am
Posts: 29
Hi,

1) is there the possibility to tell Artifact generator to implement the equals and hashcode methods too ? If I have to use a template in order to do this, doeas anyone have an example ?

2) is it already planned to update the java (pojo) classes with reverse engeeniring taking care not overwriting the changes made in the previous pojos classes (maybe with help of an abstract class) ?

Thank U very much and compliments for this product.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 24, 2005 5:46 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
#1 the jdbc meta data information does contain enough information to decide which properties should be used for equals/hashcode.
(we might add that as something to do via the reveng.xml)

#2 hbm2java supports the <meta attribute="generated-class"> to do exactly this. This is a per-class thing and again we might add it as an global/class option via reveng.xml.

We also have a jira for adding global generation of a base class and concrete subclass (even though i hate this form since it creates twice as many classes as necessary ;)

Note: in cvs the hbm2java generates equals/hashcode when you speicfy <natural-id>

_________________
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.