-
Notifications
You must be signed in to change notification settings - Fork 3.3k
SqlServer does not read DbNull for null value in rowversion column #22256
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Added a disabled regression test in codebase |
As I discovered by me in my original issue, rowversion cannot be NULL in Sql Server, NULL is represented by 0x. This means that the IsDBNull check which is used by EntityFrameworkCore is not enough for rowversion columns.
I'm glad you are finally looking into the direction of a customized converter for Sql Server, as I suggested. Unless you can contact the Sql Server team about this, but due to backwards compatibility they might be afraid to correct it. |
@bdebaere - Neither of the aforementioned options are right solution. |
is equal to
|
As @ErikEJ found #21269 (comment)
In our shaper when reading value of the column solely,
we generate checks but all checks are bypassed and we throw IndexOutOfRangeException.
Method body of ReverseLong which generates the error
May be we need to add customized converter for SqlServer in this case.
The text was updated successfully, but these errors were encountered: