-->
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.  [ 5 posts ] 
Author Message
 Post subject: problem in reverse-engineering a boolean type
PostPosted: Sat Oct 01, 2005 9:35 pm 
Beginner
Beginner

Joined: Sun Jul 25, 2004 11:15 pm
Posts: 24
Hi
I am using hsqldb and hibernate tools 3.1.0 alpha 5

I have a table which has a column of type BOOLEAN, and when I try to reverse-engineer it, I get the following error:

org.hibernate.cfg.JDBCBinderException:The type java.lang.Object spans multiple columns. Only single column types allowed for single columns.

I changed the type to BIT, and I still got the same error.
The only thing that is close to BOOLEAN that works is NUMERIC(1)

is this a known bug? or am I missing something?

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 10:15 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
Do you try set reveng.xml - mapping boolean to what you want ?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 10:21 pm 
Beginner
Beginner

Joined: Sun Jul 25, 2004 11:15 pm
Posts: 24
snpesnpe wrote:
Do you try set reveng.xml - mapping boolean to what you want ?


I don't quite understand what you mean.
The reveng.xml file contains table names. it does not contain any boolean mapping as far as i can tell.

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 10:26 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
you can map database type to hibernate type , too
for example
Code:
<sql-type jdbc-type="BOOLEAN" hibernate-type="YourType" />


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 02, 2005 2:51 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
btw. boolean is now mapped by default in the cvs so this will not be necessary in the upcoming release.

_________________
Max
Don't forget to rate


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