-->
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.  [ 1 post ] 
Author Message
 Post subject: Reverse engineering problem on Oracle NUMBER(1) type
PostPosted: Tue Oct 28, 2008 12:59 pm 
Newbie

Joined: Tue Oct 28, 2008 12:18 pm
Posts: 1
Hello everyone,
Im a little new in Hibernate world so forget me for my ignorance...
I was tring to do a reverse engineering on a client dataBase but i found something strange.
Some columns in their tables have the NUMBER data type with size 1 ( NUMBER(1,0)) and the hibernate reverse engineering maps those fields like a BOOLEAN type instead of a numerical type.

I read something on the internet about the JDBC considering this NUMBER(1) type like a boolean or a bit type so i thought to write a hibernate.reveng.xml and force the hibernate-type of any BOOLEAN to an INTEGER like this:

Code:
<hibernate-reverse-engineering>
  <type-mapping>
    <sql-type jdbc-type="BOOLEAN"  hibernate-type="integer" />
  </type-mapping>
</hibernate-reverse-engineering>   


But it hasn't work at all. So is it a JDBC problem or can i solve this in another way?
Thanks in advance.

Hibernate version: Hibernate Tools 3.2.0

Name and version of the database you are using: Oracle 10


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.