Given two entities: Parent, Child.
Table per type inheritance what does it do when:
-
You add an entity called Child, with all of its values left blank, but its Parent properties filled out. Will it add the child entity or just the Parent?
-
If the entity Parent with ID == id, exists, but it has no Child, will a query against the repository Child, with predicate ID == id, return anything? Ie. will such query be translated into left join or cross join?
It will always try to add an entry into both tables
EF wouldn’t return anything. The resulting SQL is a left join