Using the May-28 Alpha 1.2.0.1001, I have a subclass that I am using with a named query for a special purpose under the table-per-class hierarchy strategy. I will not be creating lists where subclasses will coexist.
Unless I add a <discriminator /> element to the parent class mapping, an exception is thrown. Since I am allowing the discriminator-value on the subclass to default to the class name, I can eliminate the exception by placing an empty discriminator element in the parent mapping.
I would like to implement this pattern without having to modify the parent class mapping, since it is a generated file. I could default to create one all the time, but the IsPolimorphic test will return true and I expect this could affect performance if it is im mappings for classes not needing it quite yet.
I would like to see NH tolerate a subclass with a parent class that does not specify a discriminator if the subclass uses the default discriminator-value of the class name.
|