posted 16 years ago
Hi!
I have the following classes:
Too, I have a class like this:
I'm mapping the classes A, B and MyClasses using the union-subclass strategy, as I'd like all variables in A and B to be replicated to the MyClasses. Also, I don't want A and B to have a table of their own, so they are marked with . The mapping works like a charm, the tables created are exactly as I want them to be.
I map the MySetClass as following:
The problem arises when I'm trying to persist the Set in MySetClass:
yields the following exception:
Invalid object name 'A'.
I assume the exception arises because Hibernate looks for a table named 'A', but it doesn't exist because it's abstract (and therefore marked with abstract="true" in the mapping file).
What am I doing wrong here? I cannot be that Hibernate cannot figure out what to do in the example above? It's just trivial inheritance.
Regards,
Janus