-->
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: NullableBoolean with YesNo?
PostPosted: Thu Nov 03, 2005 6:24 pm 
Expert
Expert

Joined: Fri Oct 28, 2005 5:38 pm
Posts: 390
Location: Cedarburg, WI
I'm mapping to a legacy database where booleans are stored as CHAR(1), having either 'Y', 'N' or NULL.

If I define the NHibernate type as 'YesNo', queries return a regular, non-nullable boolean. Any attempt to define the mapped class property as a NullableBoolean will fail.

Perhaps what is needed is a NullableYesNo type ...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 07, 2005 10:04 am 
Contributor
Contributor

Joined: Thu Jun 23, 2005 1:08 pm
Posts: 32
Location: Baltimore, MD
Possibly. For now you can make an IUserType that handles that situation and returns either a NullableBoolen or just an enum (Yes, No, Unknown).


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.