Maps a Boolean to a 1 char AnsiStringFixedLength column
that stores a to indicate .
Namespace: NHibernate.TypeCopyC#
'Y'/'N'
CopyC#
true/false
Assembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
[SerializableAttribute] public class YesNoType : CharBooleanType |
Visual Basic |
---|
<SerializableAttribute> _ Public Class YesNoType _ Inherits CharBooleanType |
Visual C++ |
---|
[SerializableAttribute] public ref class YesNoType : public CharBooleanType |
Remarks
If you are using schema-export to generate your tables then you need
to set the column attributes: length=1 or sql-type="char(1)".
This needs to be done because in Java's JDBC there is a type for CHAR and
in ADO.NET there is not one specifically for char, so you need to tell schema
export to create a char(1) column.
Inheritance Hierarchy
System..::..Object
NHibernate.Type..::..AbstractType
NHibernate.Type..::..NullableType
NHibernate.Type..::..ImmutableType
NHibernate.Type..::..PrimitiveType
NHibernate.Type..::..BooleanType
NHibernate.Type..::..CharBooleanType
NHibernate.Type..::..YesNoType
NHibernate.Type..::..AbstractType
NHibernate.Type..::..NullableType
NHibernate.Type..::..ImmutableType
NHibernate.Type..::..PrimitiveType
NHibernate.Type..::..BooleanType
NHibernate.Type..::..CharBooleanType
NHibernate.Type..::..YesNoType