-->
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: Customize Foreign key property
PostPosted: Thu Nov 17, 2011 4:50 pm 
Newbie

Joined: Thu Oct 20, 2011 12:20 pm
Posts: 2
Hi, Does anyone know how to customize a foreign key property using hibernate-tools reverse engineering?
So fat I am able to use customized strategy class overriding columnToPropertyName() method.

This works for regular column, but for foreign key column, no matter what is returned from the method, the tools always generate the foreign table's class name as property.

Thanks

G


Top
 Profile  
 
 Post subject: Re: Customize Foreign key property
PostPosted: Mon Nov 21, 2011 7:42 pm 
Newbie

Joined: Mon Nov 21, 2011 6:21 pm
Posts: 3
Control the foreign key property name from <foreign-key> instead of <column>:

<foreign-key constraint-name="fk_foo">
<many-to-one property="reallyGoodNameForFoo" />
</foreign-key>


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.