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

DbUpdateException.Entries is empty when a unique constraint sql error is thrown. #7829

Closed
alaatm opened this issue Mar 10, 2017 · 12 comments
Closed
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. punted-for-2.0 punted-for-2.1 punted-for-2.2 punted-for-3.0 punted-for-3.1 type-bug
Milestone

Comments

@alaatm
Copy link
Contributor

alaatm commented Mar 10, 2017

When a DbUpdateException is thrown because of unique index constraint, the DbUpdateException.Entries collection is empty. Is this an expected behavior or should it contain the involved entity in there?

Further technical details

EF Core version: 1.1.1

@alaatm alaatm changed the title DbUpdateException.Entries is empty when a unique constrained sql error is thrown. DbUpdateException.Entries is empty when a unique constraint sql error is thrown. Mar 10, 2017
@ajcvickers ajcvickers added this to the 2.0.0 milestone Mar 10, 2017
@jpiquot
Copy link

jpiquot commented Mar 12, 2017

Hi,
I have the same issue on unique indexes or on primary key duplicates. The Entries value of the DbUpdateException is empty.

Regards

Versions:
EF Core version: 1.1.0
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10
IDE: Visual Studio 2017

@ajcvickers
Copy link
Member

@SebastiaanPolfliet Unfortunately, it had to be cut from 3.0. However, it is scheduled for the 3.1 release scheduled for the beginning of December.

@Detzito
Copy link

Detzito commented Dec 4, 2019

I do also need it but it seems it has not been fixed in 3.1...

@ajcvickers
Copy link
Member

Re-triage based on #15404 (comment)

@roja
Copy link

roja commented Mar 11, 2020

Any update on this? It stops us from recovering from unique collisions.

@ajcvickers
Copy link
Member

@roja This issue is in the Backlog milestone. This means that it is not planned for the next release (EF Core 5.0). We will re-assess the backlog following the this release and consider this item at that time. However, keep in mind that there are many other high priority features with which it will be competing for resources.

@DeluxeAgency2020
Copy link

DeluxeAgency2020 commented Jul 4, 2020

@ajcvickers Is any workaround for this issue with a performance problem?

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. punted-for-2.0 punted-for-2.1 punted-for-2.2 punted-for-3.0 punted-for-3.1 type-bug
Projects
None yet
Development

No branches or pull requests

9 participants