We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm having a setup like for example:
public Context : DbContext { public DbSet<Animal> Animals { get; set; } } public class Animal { public string Color { get; set; } } public class Cat : Animal { public int Lives { get; set; } } public class Dog : Animal { public int Puppies { get; set; } }
I am then adding a Cat and a Dog to my collection (_context.Animals.Add(new Dog() {...}); and _context.Animals.Add(new Cat() {...});
_context.Animals.Add(new Dog() {...});
_context.Animals.Add(new Cat() {...});
However, in the CosmosDb, the properties Color and Lives are not saved in the JSON document. Is there a way to allow this?
Color
Lives
Thanks.
EF Core version: 3.0.0-preview9.19423.6 Database Provider: Microsoft.EntityFrameworkCore.Cosmos Operating system: Windows 10 IDE: Visual Studio 2019
The text was updated successfully, but these errors were encountered:
@NickSevens This is not Cosmos-specific, owned types do not support inheritance
Sorry, something went wrong.
No branches or pull requests
Steps to reproduce
I'm having a setup like for example:
I am then adding a Cat and a Dog to my collection (
_context.Animals.Add(new Dog() {...});
and_context.Animals.Add(new Cat() {...});
However, in the CosmosDb, the properties
Color
andLives
are not saved in the JSON document. Is there a way to allow this?Thanks.
Further technical details
EF Core version: 3.0.0-preview9.19423.6
Database Provider: Microsoft.EntityFrameworkCore.Cosmos
Operating system: Windows 10
IDE: Visual Studio 2019
The text was updated successfully, but these errors were encountered: