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

[6.0.1] Use a unique identifier for variables during insert #26679

Merged
merged 2 commits into from
Nov 15, 2021

Conversation

AndriySvyryd
Copy link
Member

Fixes #26632

Description

When the entity types have store-generated primary keys invalid SQL is produced when a single entity of one type as well as 3 or more (or the amount specified in MinBatchSize) are inserted together.

Customer impact

SaveChanges produces invalid SQL that results in an exception. The workaround would be to call SaveChanges after each batch of specific entity type is added, but this isn't always practical.

How found

Customer reported on 6.0

Regression

Yes, this worked in 5.0. Introduced in #25718

Testing

Added test for this scenario.

Risk

Low, the change has very predictable impact. Also added a quirk mode.

@AndriySvyryd AndriySvyryd requested a review from a team November 14, 2021 23:02
@AndriySvyryd AndriySvyryd added this to the 6.0.x milestone Nov 15, 2021
@AndriySvyryd AndriySvyryd modified the milestones: 6.0.x, 6.0.1 Nov 15, 2021
@AndriySvyryd AndriySvyryd changed the title [6.0.1] Use a unique identifier for variables during insert Use a unique identifier for variables during insert Nov 15, 2021
@AndriySvyryd AndriySvyryd merged commit 03de889 into release/6.0 Nov 15, 2021
@AndriySvyryd AndriySvyryd deleted the Issue26632 branch November 15, 2021 21:05
@ajcvickers ajcvickers removed this from the 6.0.1 milestone Nov 17, 2021
@ajcvickers ajcvickers changed the title Use a unique identifier for variables during insert [6.0.1] Use a unique identifier for variables during insert Nov 17, 2021
This pull request was closed.
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.

3 participants