First, thanks for your reply
In fact I confronted with the problem of implement a kind of multi-inherit
relation in mapping file.
For example, classImpA implement classA extend classImpB
and classA extend classC classImpC implement classC
In mapping file
ClassImpA is decleared as jontsubclass of ClassImpB and has follow statement.
<many-to-one name="xxx" class="ClassImpC">
In fact classA is subclass of classC
But since I don't know how to declare such relation in mapping file
so when I excute follow statement :
facade.setup()
ClassA a = new ClassA();
xxx.setXXX(a); ------ the method is defined as setXXX(ClassC c)
facade.store(xxx);
I got the error message:
Insert and Update of table "ClassC" is violate to the constraint key ...
Because ClassA is not looked as subClass of ClassC
Does anyone know how to solve such problem without changing inherit
structure.
Thanks a lot
|