-->
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: mapping types
PostPosted: Fri Apr 13, 2007 11:16 am 
Beginner
Beginner

Joined: Fri Apr 13, 2007 9:27 am
Posts: 33
Hello:
I am using Hibernate tools 3.2 Eclipse plugin.

I have some data fields of type 'numeric' in a databse table. There is a rule states that the field value is either '1' or '0'.
Hibernate generation tool sets the type of those fields to boolean.

Can some explain to me why Hibernate using 'boolean' instead of 'numeric'?

Thanks

Sorry for the double post, I don't know on which forum this question should be asked


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 14, 2007 10:14 pm 
Senior
Senior

Joined: Tue Mar 09, 2004 2:38 pm
Posts: 141
Location: Lowell, MA USA
I'll assume your using the reverse engineering tools to generate your object model. I don't know what database you are using, but some numeric types are treated as booleans. For example, if you were using MySQL, a column using a type of tinyint(1) might be interpreted as a boolean. However, you can override the default behavior in the plugin.

Ryan-

_________________
Ryan J. McDonough
http://damnhandy.com

Please remember 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.