Database first development, Target per entity hierarchy inheritance.
Let's say I have a table SomeTable like:
Id (PK)
Field1
OtherTableId (FK, nullable)
Discriminator
I create a super-type without FK, like:
Supertype table
Id (PK)
Field1
Discriminator
And subtype table with this additional field?
OtherTableId (FK, nullable)
Here is what I do. Create sub type. Remove OtherTableId field from super-type and map it to sub-type. That's fine. But the relationship is stuck at super-type. I remove it and manually recreate it at sub-type. That works but it could be better done.
1. When removing the field (from super-type) the matching relationship could be automatically removed. It works the other way round.
2. When mapping a field into sub-type the relationship could be automatically created.
3. Is it possible to have a Many-1 instead of Many to 0...1 on sub-type? I get warnings that an int is mapped on nullable field when Many-1 is enforced in designer. OtherTableId has to be nullable in database due to the hierarchy.