Is it possible to have a discriminator that works like this with NHibernate?
If the value is String.Empty → Class1 Else → Class2
I already have a string column for CultureName, and I would like to use it as a discriminator. I do not want to add an additional logical column. If CultureName is String.Empty, then I would like to use one class and the other -.
If this is not possible, could you please help me find a way to do this.
I use xml mappings (not Fluent NHibernate).
What I'm looking for is a bit of a wildcard for the else (default) case, so I can do the following:
<subclass name="Class1" discriminator-value="">
<subclass name="Class2" discriminator-value="*">
source
share