NHibernate中可空类型配置出错,一天了还未解决,请指教
NHibernate中可空类型配置出错:
1. .hbm     
     <!-- 用户ID  -->
     <property name="UserID" type="System.Nullable`1[[System.Int64, mscorlib]], mscorlib">
       <column name="UserID" sql-type="bigint" length="8" not-null="false"/>
     </property>  
2. Domain         
         private Int64? _UserID;
         /// <summary>
         /// 用户ID
         /// </summary>
         public virtual Int64? UserID
         {
             set { _UserID = value; }
             get { return _UserID; }
         }  
3. 错误内容:      
在列“UserID0_0_”上的 GetBytes 尝试无效。GetBytes 函数只能用在 Text、NText 或 Image 类型的列上。
------解决方案--------------------
我对于 int bigint 等类型时 映射文件 我是不会加length的.
------解决方案--------------------
我对于 int bigint 等类型时 映射文件 我是不会加length的