-->
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: How to convert char(1) column with T/F values into boolean?
PostPosted: Tue Apr 19, 2005 8:57 pm 
Newbie

Joined: Tue Apr 19, 2005 7:36 pm
Posts: 9
Location: San Francisco, CA
I have a column in Oracle DB, named "ISADMIN", which is defined as CHAR(1) with possible values 'T' and 'F'. My mapping file maps this column to a field of type "boolean".

I tried to rely on auto-conversion of the value into boolean, but I am getting this error:

Code:
An SQLException was provoked by the following failure: java.lang.NumberFormatException: For input string: "F"


Any suggestions on how to convert those values are appreciated.

Thank you,
Konstantin[/code]

_________________
Thanks,
Zeel.

Software Developer, Audiologist/DJ, Cookie Monster
All Original Electronic Music - download MP3s:
=> http://www.polygroovers.com/


Top
 Profile  
 
 Post subject: Re: How to convert char(1) column with T/F values into boole
PostPosted: Tue Apr 19, 2005 9:14 pm 
Newbie

Joined: Tue Apr 19, 2005 7:36 pm
Posts: 9
Location: San Francisco, CA
Got it - gotta use "true_false" as the data-type in the mapping file, instead of "boolean".

Thanks,
konstantin

_________________
Thanks,
Zeel.

Software Developer, Audiologist/DJ, Cookie Monster
All Original Electronic Music - download MP3s:
=> http://www.polygroovers.com/


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.