PawelGerr/Thinktecture.EntityFrameworkCore

Losing deviated data on abstract DbSet

Closed this issue · 1 comments

Hallo,

I have an abstract DbSet and a couple of deviated entities using this base class.
I had to define a custom Discriminator to get this work and i'm also using shared columns here.

Everytime i'm using your BulkInsert(OrUpdate) extensions i'm losing all properties
of the deviated types and there columns are containing null only.

When i'm using AddRange or Update from the EF libraries everything works slowly fine.
Is there any chance that this can get fixed on your package?

My Specs: net Core 7.x, EF 7.x, Thinktecture 7.x Beta on Sql Server

Regards

As I understand, you are using TPH in your project.
The library does not support any kind of inheritance (yet) but you can check out the workaround.
The method BulkInsertHierarchyAsync groups the entities by type and inserts the groups separately.

I will look into this in the following weeks. Maybe the workoround is the way to go, it just needs a bit polishing.