-->
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: cfg2hbm Foreign Key get/set naming convention
PostPosted: Thu Jun 09, 2005 11:43 am 
Newbie

Joined: Thu Jun 09, 2005 11:21 am
Posts: 1
Location: USA
Hibernate version:
3.0 alpha 4

In our project, the database schema design changes very often
and so we like to re-generate the POJO and .hbm.xml files using
Hibernate Tools eclipse plugin.

The problem that I have is when a table has more than one foreign keys
referring to another table, the getter and setter methods follow the naming convention of

get<PKTableName>_1
get<PKTableName>_2
and so on to make it unique.

But we like to follow the naming convention as <u>middlegen</u> does :

get<PKTableName>By<FKFieldName>

and the same thing for the reverse relations as well (i.e many-to-one and one-to-many)

Is there a way to make this happen when I use Hibernate Extension Tools 3.0 Alpha 4?

Thanks
Premanand.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 09, 2005 1:12 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Not configuration wise in the UI or ant (please add a jira for it)

But you can provide your own ReverseEngineeringStrategy (currenlty only via ant) where you in foreignKeyToCollectionName and/or foreignKeyToEntityName do your thing.

We might need to send in more than the current parameters - but feel free to suggest it via the jira

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