-
Notifications
You must be signed in to change notification settings - Fork 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
Owned Shadow Properties: design considerations #1463
Comments
What you are trying to add is not shadow property but shadow navigation. Shadow navigations are not supported. See #3864 Also your model configuration code has many mistakes. Leaving this issue open to discuss if we want to update the exception message or documentation to be clearer. |
@smitpatel thanks to pointing to ticket, a change in error message to pinpoint the fact that shadow property and shadow navigation is different kind of beast help understand situation better Proposing change of error message from(feel free to change it English language is not my primary):
To:
Also im going to create issue in relevant docs.microsoft.com repo for change in documentation to reflect the present limitation and difference between shadow property vs shadow navigation because currently there are clear statement what kind of shadow not supported Edit: fix quote formatting |
Duplicate of #1460 |
I have tried to model a workaroud of not yet implemented feature many-to-many relationship #1368 trough owned shadow properties via fluent api and got an error message that at first sight seems conflict with definition of shadow properties given in documentation.
From documentation about shadow properties
but the message i've got tells me that shadow property dont have correspoding CLR property.
This leads me to a question:
Is there anything wrong with trying to make a shadow owned properties or im misunderstool the thing i have read in documentation?
Im 100% understand my use case is silly, im just seeing owned properties as a way to do a table splitting and shadow properties as an instrument of keeping underlying EF Core mechanics away from POCO that represents business data and trying to glue then together
More details:
Steps to reproduce
First i defined shadow property then i tried to use .OwnsMany to model many to many relationship trough helper object. Im using reflection since i have a lot of model that have many to relationship and i personally dont like copy paste approach
Further technical details
EF Core version: 2.2.0
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows Server 2012 R2
IDE: (e.g. Visual Studio 2017 15.8.9)
The text was updated successfully, but these errors were encountered: