-->
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: get foreign keys names from database when reverseengineering
PostPosted: Fri Nov 24, 2006 11:24 am 
Newbie

Joined: Fri Nov 24, 2006 10:50 am
Posts: 1
I use hibernate tools from eclipse 3.2.1 and i do reverse engineering. in the database i have defined tables and also relations between them. how can i write in the hibernate.reveng.xml to put the names of the foreign keys from the database in the .hbm.xml files? perhps this is possible if i try reverse engineering using ant?

my problem is when i use those .hbm.xml files to update the database, and because i don't have the foreign key defined in the .hbm.xml file, it duplicates the foreign key. i know i can specify manually for each table the foreign key in the hibernate.reveng.xml, but that is a lot of work for a big database.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 24, 2006 6:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
customize the *.hbm.ftl to list the foreign-key names.

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