Throw exception when shadow principal key is created by convention #3978
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
I'm not sure if this is a bug or just me doing something wrong but if I create a simple entity that can optionally have children of the same type, or a parent of the same type I'm unable to setup the model to produce the correct database.
I have a set of terms which can have child terms under them to build a taxonomy. When I create the migration it produces and additional column for what should be the FK to the parent term. I originally tried with annotations and later with fluent with the same issue.
This is the Term entity
Fluent model builder
This is what a snippet of the migration looks like but the issue for me is the non nullable ParentId1
I've added a repo with the code to reproduce this to https://github.com/stevejgordon/EF7SelfRefTest
The text was updated successfully, but these errors were encountered: