-->
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: Boolean problem..
PostPosted: Mon Apr 19, 2004 1:39 pm 
Beginner
Beginner

Joined: Fri Jan 23, 2004 10:26 am
Posts: 21
i cannot insert an object containing a Boolean object.

i have a class like:

Code:
public class Blah
{
    Long id;
    String type;
    Boolean obsolete = new Boolean(false);
....
}


and a mapping file like this

Code:
<hibernate-mapping>
    ....
        <property name="obsolete" column="OBSOLETE" type="boolean"/>
   ....
</hibernate-mapping>


But when i want to add an object to the DB, it gives me

Code:
java.sql.SQLException: Wrong data type: For input string: "FALSE" in statement


and the column for that property that hibernate creates is like this:

Code:
create table BLAH (...OBSOLETE TINYINT null...)


i use in memory HSQLBD db (actual db is MSSQL but i override it) and Hibernate 2.1.2


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 19, 2004 2:41 pm 
Beginner
Beginner

Joined: Fri Jan 23, 2004 10:26 am
Posts: 21
As i understand, problem is related with dialect. it seems i cannot override original mapping file. i will check and ask further questions later.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 19, 2004 3:15 pm 
Beginner
Beginner

Joined: Fri Jan 23, 2004 10:26 am
Posts: 21
ok, as i guessed, i couldnt override the "Dialect " property, so system was trying to access HSQLDB with MSSQL dialect. it is solved now.


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.