Hi Everyone,
I have classes A, B, C, D, E and F where B extends from A, C extends from B D extends from A, E extends from D F extends from A.
I want to use Joined inheritance strategy at A and Table per concrete class inheritance strategy from B,D and F level. A,B and D are abstract classes and C,E and F are concrete classes.
Is this possible and if yes how should we do it. When I try, I end up getting separate tables for all 6 classes and I want 4 tables to get created (one for A and 3 for C,E and F respectively).
I used @Inheritance(strategy = InheritanceType.JOINED) in class A and @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) in classes B,D and F
I have seen examples to mix table per hierarchy and joined inheritance strategies but I want to implement what I mentioned above without using table per hierarchy.
Please help me out.
|