liuweitoo 发表于 2012-10-25 23:57:12

NHibernate中可空类型配置出错,一天了还未解决,请指教

NHibernate中可空类型配置出错,一天了还未解决,请指教

NHibernate中可空类型配置出错:
1. .hbm   
    <!-- 用户ID-->
    <property name="UserID" type="System.Nullable`1[], 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 类型的列上。
页: [1]
查看完整版本: NHibernate中可空类型配置出错,一天了还未解决,请指教