Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/7.0] Fix SQL Server result mapping for bulk insert (#29565) #29590

Merged
merged 1 commit into from Nov 29, 2022

Conversation

roji
Copy link
Member

@roji roji commented Nov 16, 2022

Fixes #29502, backports #29565

Description

When reading generated columns back in SaveChanges, the SQL Server logic for matching returned rows back to entities was incorrect for some cases of bulk insertion.

Customer impact

When inserting rows into the same table in SQL Server within the same SaveChanges, an exception could occur, or possibly incorrect propagation of database-generated values.

How found

Customer reported on 7.0

Regression

Yes.

Testing

Added a test for the affected scenario.

Risk

Low; the fix is quite trivial, and a quirk was added to revert back to older behavior.

@roji roji requested a review from a team November 16, 2022 19:53
@ajcvickers ajcvickers added this to the 7.0.x milestone Nov 17, 2022
@roji roji changed the title Fix SQL Server result mapping for bulk insert (#29565) [release/7.0] Fix SQL Server result mapping for bulk insert (#29565) Nov 17, 2022
@rbhanda rbhanda modified the milestones: 7.0.x, 7.0.2 Nov 29, 2022
@wtgodbe wtgodbe merged commit dd2c6c3 into dotnet:release/7.0 Nov 29, 2022
@roji roji deleted the SqlServerBulkInsert7 branch November 30, 2022 00:13
@ajcvickers ajcvickers removed this from the 7.0.2 milestone Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants