-->
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: Oracle migration to UTF: yes_no type stopped working
PostPosted: Thu Mar 13, 2008 3:27 am 
Newbie

Joined: Tue Nov 30, 2004 5:35 am
Posts: 5
Hi,
We recently migrated our Oracle 10g database to support UTF8 encoding on all strings. Everything seems to work ok except for the Hibernate yes_no type, which now always returns a false value whether the data is 'Y' or 'N'. Our java boolean properties are modeled as char(1) in the database. During the migration, we did not change the schema, however when we now look at those columns through Toad they are shown as char(4), obviously because of the UTF8 encoding. It seems that the Hibernate yes_no type doesn't support this new encoding. The hibernate.connection.defaultNChar property doesn't make any difference. Is there a known solution?
Database: Oracle 10g
Hibernate version: 2.0
Exceptions thrown: none
retrieval technique: session.load()
Sample mapping:
Code:
<property name="withForum" column="ALE_WITH_FORUM" type="yes_no" />


Thanks.
Miguel


Top
 Profile  
 
 Post subject: zero_one custom type?
PostPosted: Thu Mar 13, 2008 9:31 pm 
Newbie

Joined: Tue Nov 30, 2004 5:35 am
Posts: 5
Both yes_no and true_false map a java boolean to a database char(1) column. Has anyone created a custom type that would map to a number(1,0), so we could map a java boolean to 0 and 1 values? That could be a workaround for the encoding issue.


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.