-->
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: 1 digit numeric getting mapped as boolean by generator
PostPosted: Fri Sep 09, 2005 4:13 am 
Senior
Senior

Joined: Tue Aug 03, 2004 2:11 pm
Posts: 142
Location: Somerset
hibernate-tools-3.1.0.alpha5

If you reverse engineeer a table to create a domain model and hibernate mapping files, any field defined on the table as NUMERIC 1 gets mapped as a type of "boolean."

This is incorrect as a NUMERIC 1 can hold values from 0-9, not true or false.

_________________
On the information super B road


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 09, 2005 9:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
then redefine it in a reveng.xml

NUMERIC 1 seems to be mostly used to map to a boolean thus we chose to do that per default instead of the more mathematical correct byte field.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 09, 2005 12:47 pm 
Senior
Senior

Joined: Tue Aug 03, 2004 2:11 pm
Posts: 142
Location: Somerset
max wrote:
then redefine it in a reveng.xml

NUMERIC 1 seems to be mostly used to map to a boolean thus we chose to do that per default instead of the more mathematical correct byte field.


I must admit we tend use it exactly so but thought it was worth checking anyway.

Thanks for reveng.xml hint.

_________________
On the information super B road


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.