二进制Blob截取到8000字节 - SQL Server 2008 / varbinary(max) [英] Binary Blob truncated to 8000 bytes - SQL Server 2008 / varbinary(max)
问题描述
我已经从功能NHibernate 1.0升级与NHibernate 2.1预先与NHibernate 3.0 GA
版本1.x和击中我认为是一个倒退,但我想听到的话,那确实是这样的。
I have upgraded from Fluent Nhibernate 1.0 with Nhibernate 2.1 to pre- release 1.x with NHibernate 3.0 GA and have hit what I think is a regression, but I want to hear if that's indeed the case.
我在使用SQL Server Express 2008年和2008年MSSQL方言,有型为System.Drawing.Image的
图像属性和我制订它像
该:
I am using SQL Server Express 2008 and the MSSQL 2008 dialect and have an Image property of type System.Drawing.Image and I have mapped it like this:
Map (food => food.Image)
.Length (int.MaxValue)
.Nullable ();
表中的图像
列是键入 varbinary(MAX)
。
产生的hbm属性是:
The generated hbm for the property is:
<property name="Image" type="System.Drawing.Image, System.Drawing,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<column name="Image" length="2147483647" not-null="false" />
</property>`
然而不管我做了什么,当使用当前的FNH和NH版本序列化到8000字节
。以前的版本并没有使用
。
However no matter what I do the binary blob is truncated to 8000 bytes when serialized with the current FNH and NH versions. That didn't used to be the case with previous versions.
这种情况发生的原因以及如何解决/解决方法?
Ideas of why this is happening and how to fix/workaround it?
推荐答案
这是一个回归。我提出一个错误,在 https://nhibernate.jira.com/browse/NH-提供的补丁2484
This is a regression. I have raised a bug and provided patches at https://nhibernate.jira.com/browse/NH-2484
这篇关于二进制Blob截取到8000字节 - SQL Server 2008 / varbinary(max)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!