-->
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.  [ 3 posts ] 
Author Message
 Post subject: Customising names (mapping files + foreign key)
PostPosted: Wed Dec 01, 2004 6:03 am 
Newbie

Joined: Thu Nov 25, 2004 6:10 am
Posts: 1
Hibernate version: 2.1.6

Name and version of the database you are using: Oracle9i

Hi

I'm generating hbm files with middlegen 2.1 from an existing datamodel (Oracle) with table names in upper case.

I'm wondering whether it would be possible to
a) custom the name of the hbm files, so that they fit the java name convention
(eg. table name = SPECIALELEMENT, generated mapping name = Specialelement, wanted name = SpecialElement).

b) indicate the names of the foreign key existing in the database for the generated mapping files. At the moment, when I regenerate the DDL's from the hbm files with the tool SchemaExport, all the foreign key names are autogenerated.

c) in case b) cannot by solved within middlegen properties, would it be possible to indicate a specific foreign key name in the hbm file?


Thanks in advance for help/info
Fab


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 01, 2004 7:25 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
For (a) see this http://forum.hibernate.org/viewtopic.php?t=936506
(b) is a hibernate schema export issue so see
http://www.hibernate.org/hib_docs/reference/en/html/toolsetguide.html#toolsetguide-s1
and the foreign key attribute.

Middlegen does not support custom foreign-key tag names as yet.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 02, 2004 11:22 am 
Newbie

Joined: Fri Nov 26, 2004 2:59 am
Posts: 5
Thanks for the valuable tips :-)


Fab


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.