Can anyone tell me if it is possible to map an abstract class? It doesn't look like it's possible, but maybe I'm doing something wrong. For example, I want to do something like this:
Code:
<class name="BaseClass" discriminator-value="BaseClass">
<id>...</id>
<discriminator/>
<property ... />
<property ... />
<property ... />
<subclass name="ConcreteClassA" .../>
<subclass name="ConcreteClassB" .../>
<subclass name="ConcreteClassC" .../>
</class>
where BaseClass is abstract. It looks like Hibernate requires that BaseClass be concrete (and also have a no-arg constructor, etc.) even though there are no actual records with that type. I can, of course, map each subclass separately, but then I have to duplicate the properties. It would be more convenient if I could map it as above.
Thanks