Hi everyone, I am running into an issue using EF code-first migrations and lists of objects that share a same base class. Here is what I have:
Post base class has Id and ParentPostId for tree data structure support
Question is a post
Answer is a post
Comment is a post
Question has a list of Comments
Answer has a list of Comments
When running add-migration, Comments lists have generated Question_Id and Answer_Id columns and indexes. I assume this is to allow a Comment post to have a many to one relationship with Answers/Questions. But I want to use the inherited ParentPostId for this relationship. Can anyone point me in the right direction for making this work the way I want when using EF code-first?
Thanks!