-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate-Middlegen issue
PostPosted: Mon Aug 02, 2004 8:26 am 
Beginner
Beginner

Joined: Thu Jul 22, 2004 8:09 am
Posts: 20
Does anyone know how to change the default mapping that middlegen uses while reading database schemas to generate hibernate ( *.hbm.xml) files.

I am using middlegen to connect to a oracle database and middlegen seems to map columns of Float datatype in the database to type Object in the hbm.xml files. Similarly for Oracle column type Number it is converting into Big Decimal. Also, Oracle column type Date is mapped into Timestamp.

Can these preferences be changed via a config file or in some other place?
Any help in this will be highly appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 02, 2004 10:59 am 
Beginner
Beginner

Joined: Thu Feb 26, 2004 11:32 am
Posts: 32
When you launch Middlegen you are shown a GUI with 'Generate' button on it. One of the panels is hidden by default. You can expose it manually by resizing the lower panel. In the upper panel you can choose the options you want like choosing variable type from a drop down box.

splash


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 02, 2004 7:49 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
In addition to the GUI being used to change the types. You can code your own type mapper so that you can get the default types created the way you want them to be created. Also, you can edit the preferences file and change the types there as well.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 02, 2004 7:50 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
BTW: R5 fixed the hidden db panel issue.


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