-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Self-referencing entity circular dependency happening just on EF Core 6.0 #26750
Labels
area-save-changes
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
regression
Servicing-approved
type-bug
Milestone
Comments
/cc @AndriySvyryd Throws on 6.0; does not throw on 5.0. |
I'm having the same issue in my project after the upgrade. Does it have any known workaround until a fix is released? |
@jonasrdm We will investigate workarounds. |
AndriySvyryd
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Dec 10, 2021
AndriySvyryd
added a commit
that referenced
this issue
Dec 10, 2021
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-save-changes
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
regression
Servicing-approved
type-bug
Description
I'm not sure at all if this is a bug. At least I think is an unexpected behavior.
This behavior appeared for the first time after migrating to NET 6. I've managed to reproduce the issue in the simple project composed of the 3 files shown bellow. First I thought it was a breaking change so I reviewed all of them. However, I'm unable to find any breaking change that would cause this error. As I wasn't able to relate the error to any change I started changing efcore version in my .csproj file. As soon as I change to 6.0.0-rc.2.21480.5 for all the packages (efcore) the error doesn't show anymore. Another thing to highlight is that if I add a SaveChanges after the removes in the program.cs file the error won't happen either.
Person.cs
Context.cs
Program.cs
Stack trace
Version information
EF Core version:
Ef Core (Microsoft.EntityFrameworkCore 6.0.0)
Database provider: (Microsoft.EntityFrameworkCore.SqlServer 6.0.0)
Target framework: (.NET 6.0.0)
The text was updated successfully, but these errors were encountered: