-->
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: Middelgen: mapping MySql INT type to java.lang.Object in hbm
PostPosted: Wed Mar 09, 2005 1:56 am 
Newbie

Joined: Wed Mar 09, 2005 12:36 am
Posts: 12
Hibernate version: 2.1

Name and version of the database you are using: MySql 4.1


I have an existing schema in MySql and am using middlegen to create my hbm mapping files. All of the MySql columns of type INT are getting mapped to a java.lang.Object in the hbm file.

Short of writing my own TypeMapper or manually changing every INT column mapping to java.lang.Object from java.lang.Integer in the Middlegen gui....is there any way I can influence Middlegen to make those generated mappings something other than a java.lang.Object?


Thanks in advance for any assistance.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2005 5:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You can change the type in the GUI.
If there are two many then you can edit (search/replace) the preference file to set the approrpriate type. Obviously, it would best if you copied the type mapper and made a small change and used it. Anyway, there are your options.


Top
 Profile  
 
 Post subject: Thank you...
PostPosted: Wed Mar 09, 2005 12:47 pm 
Newbie

Joined: Wed Mar 09, 2005 12:36 am
Posts: 12
I appreciate the prompt response.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 09, 2005 9:30 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Your welcome


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.