Breeze / breeze-client

Breeze for JavaScript clients
MIT License
38 stars 16 forks source link

client duplicates properties on server-side inheritance #44

Closed lvasiliou closed 3 years ago

lvasiliou commented 3 years ago

Hi I am using TPH inheritance in EF core and I can see the metadata have each property on inherited entities once. However, it appears that client-side all properties are duplicated and calling EntityManager.createEntity results into an error Error: Ids can not be autogenerated for entities with multipart keys. Looks like the entity manager assuming that both properties of the superclass and inheriting class are different. As a workaround, I removed baseTypeName from metadata generated on the server.

steveschmitt commented 3 years ago

There was a bug in the metadata generation in Breeze.Persistence.EFCore - it was duplicating properties between classes in a TPH hierarchy. Please try updating your Breeze server library to version 3.1.4 for .NETCore 3.1, or to version 5.0.4 for .NET5.

Let me know if that fixes the problem. Thanks!

steveschmitt commented 3 years ago

@lvasiliou Can we close this issue?