Obsolete
Details
Assignee
Frédéric DelaporteFrédéric DelaporteReporter
Alessandro GiorgettiAlessandro GiorgettiComponents
Fix versions
Priority
MajorWho's Looking?
Open Who's Looking?
Details
Details
Assignee
Frédéric Delaporte
Frédéric DelaporteReporter
Alessandro Giorgetti
Alessandro GiorgettiComponents
Fix versions
Priority
Who's Looking?
Open Who's Looking?
Created August 4, 2017 at 5:48 PM
Updated December 14, 2017 at 11:57 AM
Resolved December 14, 2017 at 11:56 AM
The fixed has forgot about Odbc and MsSqlCe, which had also been impacted by the seemingly rogue change "set param len" for optimizing query plan cache usage. (Commit 03eb58acae867e2d5620446c3b07cb91e7d74422.) Below is the description.
In NHibernate 2.1 we were used to map nvarchar(max) columns using something like this:
<property name="propertyname" column="columnname" type="string" length="10000" />
When using SchemaExport() this mapping correctly generates a nvarchar(max) column, but when reading and writing to the column the text is truncated to the size limit of the length specified in the mapping (10k chars in this care): if I try to store a string whose length is 12k chars I get back a 10k chars string.
Using a StringClob mapping and specifying the correct sql-type (like in the following snippet) seems to resolve the problem:
<property name="BlobSqlType" type="StringClob" >
<column name="BlobSqlType" sql-type="nvarchar(max)" />
</property>
Any other combination I've tried doesn't seem to work. This will introduce an unwanted dependency in the mappings and will force us to review all the mappings in our project if we want to switch over to NHibernate 3