-->
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: Boolean Cast ...probally really simple issue?
PostPosted: Thu Jan 05, 2006 2:38 pm 
Newbie

Joined: Fri Oct 28, 2005 8:23 pm
Posts: 12
I have a boolean type defined in my xml. In the database it is a Bit type size of 1. Whenever I ask for an object back from the db it bombs with somesort of casting issue.

"String was not recognized as a valid Boolean"


This is how its defined in my Company class xml:

Code:
<property name="activeCompany" column="ACTIVE" type="Boolean" />


This is it in my Company class
Code:
public bool activeCompany   
{
    get { return this._activeCompany; }
    set { _activeCompany = value; }
}



The error in my log is
Code:
String was not recognized as a valid Boolean.



Thanks for your input

Sean


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 3:13 pm 
Newbie

Joined: Fri Oct 28, 2005 8:23 pm
Posts: 12
It appears the ms sql type must be bit for the cast to work properly. my error was actually being generated by one that was a char type in the db.


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.