I just committed a fix for NH-3121 "Silent truncation of binary data"
(was: Regression - Binary Blob SerializationException - MSSQL 2k8 /
varbinary(max) )

https://github.com/nhibernate/nhibernate-core/commit/3cdbb5d4097de26fb667a93bab5a81e244b39648


There is a bit of confusion in the issue report, but the problem as I
see it is that NHibernate when running on MS SQL Server would cause
ADO.NET to silently truncate binary data longer than the length given
in the mapping (or 8000 bytes if the length is undefined). The exact
same scenario for strings was changed to raise an exception in 3.3.0
(NH-2528). The fix is also similar - check for this in
AbstractBinaryType.

Can anyone see a problem with my suggested fix?

Perhaps it's questionable if this is suitable for a minor release? I
really don't like silent destruction of data, however.

/Oskar

Reply via email to