文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>转:NHibernate和SqlImage

转:NHibernate和SqlImage

时间:2011-02-23  来源:江水

Table 5.5. Large Object Mapping Types

NHibernate Type .NET Type Database Type Remarks
StringClob System.String DbType.String type="StringClob" must be specified. Entire field is read into memory.
BinaryBlob System.Byte[] DbType.Binary type="BinaryBlob" must be specified. Entire field is read into memory.
Serializable Any System.Object that is marked with SerializableAttribute. DbType.Binary type="Serializable" should be specified. This is the fallback type if no NHibernate Type can be found for the Property.
解决如下

原hbm.xml
         <property   name="NH_FileContent" type="byte[]">
             <column name="FileContent" length="2147483647" sql-type="image" not-null="false"/>
         </property> 改为
         <property   name="NH_FileContent" type="BinaryBlob">
             <column name="FileContent" length="2147483647" sql-type="image" not-null="false"/>
         </property>
.net中的类型不用改

 

此内容来自http://hi.baidu.com/zhanglin34/blog/item/03ac5e9558f6514cd0135e39.html

排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载