But the user has specified what approach he is going to implement - it's a choice you make when you specify the relation.Shalex wrote:We consider that setting discriminator-value (null, not null, etc) implicitly is incorrect behaviour. This value should be specified by a user explicitly basing on the approach he is going to implement.
The ability to specify a discriminator-value for an abstract class isn't even useful in the first place - an abstract class doesn't need a discriminator, because you can't make an instance of an abstract class.
If you want to validate the model for correctness, the correct validation to perform would be to verify that an abstract class does not specify a useless discriminator-value, and issue an error-message if it does.
The fact that NH requires you to explicitly specify a discriminator-value as "not null" is just circumstance - it requires you to be explicit about the fact that an abstract class itself does not have a discriminator.
But In ED, the user has already indicated what type of inheritance pattern they intend to use - making the user actually type the words "not null" into the discriminator-input doesn't make any sense, because it's the only configuration that actually makes any sense.
Add to that the fact that many users won't know or understand how, why or when they need to type those words into that input - a few SO or Google searches will reveal that this is a commonly asked question, and a poorly documented issue.
From a number of forum threads and blog-posts, you will see that most users never even learn the correct way to configure this - they simply end up adding "dummy" discriminator-values to all of their abstract classes, not understanding why, or how to avoid doing so...