-->
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.  [ 10 posts ] 
Author Message
 Post subject: equals() and hashcode() in hbm2hbm
PostPosted: Thu Sep 07, 2006 11:54 am 
Regular
Regular

Joined: Wed Mar 15, 2006 1:48 pm
Posts: 91
I searched this forum and found I can specify meta data in hbm to generate equals/hashcode() in POJO(a hbm2java task).

My question is how I can generate this meta data in hbm file from db(a hbm2hbm task). What should I put in reveng.xml file for this purpose? I am using 3.2 beta 7 with Oracle 9i and mySQl 5.0.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 07, 2006 4:36 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not currently possible via reveng.xml

change the hbm.ftl templates to do what you want.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Re: equals() and hashcode() in hbm2hbm
PostPosted: Thu Sep 07, 2006 6:30 pm 
Newbie

Joined: Wed Sep 06, 2006 9:54 am
Posts: 9
Hi kkus,

kkus wrote:
I searched this forum and found I can specify meta data in hbm to generate equals/hashcode() in POJO(a hbm2java task).

My question is how I can generate this meta data in hbm file from db(a hbm2hbm task). What should I put in reveng.xml file for this purpose? I am using 3.2 beta 7 with Oracle 9i and mySQl 5.0.


I'm also interested in these feature because I know these from hibernate2 and middlegen I used 1 year ago for reverse engeneering. So please descripe it in Jira.

thx & best reguards
rig


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 07, 2006 6:38 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
btw. what middlegen did years back with respect to equal/hashcode might not be the best thing....you realize that, right ? :)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 07, 2006 7:00 pm 
Newbie

Joined: Wed Sep 06, 2006 9:54 am
Posts: 9
I can imagine this. But I think it would be very convenience feature, if i could directly generated the correct hbm.xml-Files with any meta-tags i need/want. So why it isn't possible to extend the hibernate.reveng.xml-file with tags like "<use-in-equals>" or "<use-in-hash>"?

reguards,
rig


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 07, 2006 7:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
well i didn't say i don't want to add it...just saying it is not there yet.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 08, 2006 10:42 am 
Regular
Regular

Joined: Wed Mar 15, 2006 1:48 pm
Posts: 91
Max,

Do you know if I can specify cascade="some value" in reveng.xml so it will be shown in hbm file? If not in reveng.xml where should I put? thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 10, 2006 9:37 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not possible yet.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 15, 2007 6:33 pm 
Beginner
Beginner

Joined: Mon May 09, 2005 5:26 pm
Posts: 21
Anyone know if this functionality has yet been added?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 4:03 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
no and it probably won't be since it can all be specified externally in your cfg.xml

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