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

SaveChanges: The temporarity of a value is not restored after an exception during SaveChanges #6720

Closed
AndriySvyryd opened this issue Oct 7, 2016 · 0 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@AndriySvyryd
Copy link
Member

AndriySvyryd commented Oct 7, 2016

This makes the next retry fail with

Cannot insert explicit value for identity column in table 'Products' when IDENTITY_INSERT is set to OFF.

Repro: see #6721

@rowanmiller rowanmiller modified the milestones: 1.1.0-preview1, 1.1.0 Oct 10, 2016
@rowanmiller rowanmiller modified the milestones: 1.1.0, 1.2.0 Oct 17, 2016
ajcvickers added a commit that referenced this issue Oct 21, 2016
Issue #6720

The fix is to stop marking the value as permanent as soon as the store generated value is generated, but instead weight until AcceptChanges when it is pushed into the entity. Also, when DiscardStoreGeneratedValues is used, a temporary value is ensured to stay temporary.
ajcvickers added a commit that referenced this issue Oct 25, 2016
Issue #6720

The fix is to stop marking the value as permanent as soon as the store generated value is generated, but instead weight until AcceptChanges when it is pushed into the entity. Also, when DiscardStoreGeneratedValues is used, a temporary value is ensured to stay temporary.
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Oct 25, 2016
smitpatel pushed a commit that referenced this issue Nov 8, 2016
Issue #6720

The fix is to stop marking the value as permanent as soon as the store generated value is generated, but instead weight until AcceptChanges when it is pushed into the entity. Also, when DiscardStoreGeneratedValues is used, a temporary value is ensured to stay temporary.
@ajcvickers ajcvickers changed the title The temporarity of a value is not restored after an exception during SaveChanges DbContext: The temporarity of a value is not restored after an exception during SaveChanges May 9, 2017
@ajcvickers ajcvickers changed the title DbContext: The temporarity of a value is not restored after an exception during SaveChanges SaveChanges: The temporarity of a value is not restored after an exception during SaveChanges May 9, 2017
@divega divega added closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. and removed closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. labels May 10, 2017
@ajcvickers ajcvickers modified the milestones: 2.0.0-preview1, 2.0.0 Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

4 participants