Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Type
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10103/Type
Modified Files:
TrueFalseType.cs YesNoType.cs
Log Message:
Added comments about needing to set sql-type or length in the hbm.xml for
the correct column type to be generated by schema export.
Index: YesNoType.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/YesNoType.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** YesNoType.cs 10 Feb 2004 18:41:42 -0000 1.3
--- YesNoType.cs 18 Jul 2004 03:06:13 -0000 1.4
***************
*** 9,26 ****
/// "Y"/"N" to indicate true/false.
/// </summary>
! public class YesNoType : CharBooleanType {
! internal YesNoType(AnsiStringFixedLengthSqlType sqlType) : base(sqlType) {
}
! protected override sealed string TrueString {
get { return "Y"; }
}
! protected override sealed string FalseString {
get { return "N"; }
}
! public override string Name {
get { return "YesNo"; }
}
--- 9,39 ----
/// "Y"/"N" to indicate true/false.
/// </summary>
! /// <remarks>
! /// If you are using schema-export to generate your tables then you need
! /// to set the column attributes: <c>length=1</c> or <c>sql-type="char(1)"</c>.
! ///
! /// 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.
! /// </remarks>
! public class YesNoType : CharBooleanType
! {
! internal YesNoType(AnsiStringFixedLengthSqlType sqlType) : base(sqlType)
! {
}
! protected override sealed string TrueString
! {
get { return "Y"; }
}
! protected override sealed string FalseString
! {
get { return "N"; }
}
! public override string Name
! {
get { return "YesNo"; }
}
Index: TrueFalseType.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Type/TrueFalseType.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TrueFalseType.cs 10 Feb 2004 18:41:42 -0000 1.2
--- TrueFalseType.cs 18 Jul 2004 03:06:13 -0000 1.3
***************
*** 9,12 ****
--- 9,20 ----
/// "T"/F" to indicate true/false.
/// </summary>
+ /// <remarks>
+ /// If you are using schema-export to generate your tables then you need
+ /// to set the column attributes: <c>length=1</c> or <c>sql-type="char(1)"</c>.
+ ///
+ /// 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.
+ /// </remarks>
public class TrueFalseType: CharBooleanType
{
|