-
-
Notifications
You must be signed in to change notification settings - Fork 597
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
Never insert/update value for Owned type which defined on base for TPH. #896
Comments
Try moving config to attribute, |
I believe I am running into this issue as well. I have the following configuration, with a table-per-hierarchy structure, where both
Then run the following code to attempt to do a Bulk Insert.
The code that inserts records is providing null values for the owned types (e.g. In my experimenting, I noticed that if I tried to change the configuration to remove the I have tried this with the current latest version, 7.0.1. I have created a small repository which should demo this scenario to reproduce the issue here: EFCore.BulkExtensions.OwnedTypeTest |
The issue is caused because of Owned being in Base class in combination with inheritance and discriminator. |
I am currently using version 6.5.4, experiencing an issue while implementing a TPH structure.
An Owned type is defined on a base Entity and the value of Owned Type for the extension entity type will never be saved in the database.
then while I was debugging, I found this from SqlServerAdapter.cs
and wonder maybe this will never find those Owned Types, from the DB context, and will not add to DataTable to save those values which are the properties of the Owned type.
Or if there are any other suggestions around this issue, will much be appreciated.
The text was updated successfully, but these errors were encountered: