Stack overflow when using circular composite key dependencies #26629
Labels
area-model-building
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
After upgrading to .net6 release version 6.0.0 from 6.0.0-rc2 we encountered a fatal stack overflow while running our application.
We searched for a while and found that our cyclic entity dependencies with composite keys are now broken.
I attached a very simple test project for reproducing the error.
It is a very simple file structure: 2 entities and the DbContext
The main method of the project is as simple as
This error occured with the provided InMemory-database as well as our SqlServer in production. (Seems provider independent)
While researching the error we assume this fix could have something to do with it:
Commit: 539aee7e60694dd608d82a4884908b8f1127a39e
We added some printf-debugging in
which results in:
And the stack overflow output is:
Minimal test project
BreakEFCore6.zip
The text was updated successfully, but these errors were encountered: