Description
Environment
None
Activity
Show:
Alex Zaytsev May 1, 2017 at 3:42 AM
Closing issues resolved in 4.1.0
Alex Zaytsev February 22, 2015 at 2:36 AM
Merged to master @ bea9bc9c1b98ae1c8b48d9dd0e16df079e7abff1
Darren Kopp April 18, 2013 at 5:58 PM
pull request here: https://github.com/nhibernate/nhibernate-core/pull/204
Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Assignee
Reporter
Components
Fix versions
Priority
Major
Who's Looking?
Open Who's Looking?
Created August 30, 2012 at 7:59 AM
Updated May 1, 2017 at 3:42 AM
Resolved February 22, 2015 at 2:36 AM
Who's Looking?
The mapping
<property name="MyBigAnsiColumn" type="AnsiString" length="1000000" />
doesn't work. The dialect creates a varchar(max) column, which is correct. But the SqlClientDriver cuts the parameter to 8000.
SqlClientDriver.cs, Line 135:
case DbType.AnsiString:
case DbType.AnsiStringFixedLength:
dbParam.Size = MaxSizeForLengthLimitedAnsiString;
break;
Compared to handling of normal strings on line 146, which supports the nvarchar(max) properly:
case DbType.String:
case DbType.StringFixedLength:
dbParam.Size = IsText(dbParam, sqlType) ? MaxSizeForClob : MaxSizeForLengthLimitedString;
break;
I decided to report it as bug, because it is not consistent between the driver and the dialect. Otherwise it would be rather a feature request.