I have 3 objects:
@Entity public abstract class A { @Id public Long id; public String a1; public String a2; public String a3;
I want to match these classes on 2 tables. The first will contain all the data A and C (i.e., Inheritance SINGLE_TABLE ). The second will contain data B and a foreign key for A (i.e. JOINED inheritance).
I tried the suggested solution here , but this does not work for me. The attributes BB1 and BB2 also included in A
How to implement such a strategy? Classes A and C are different from dogs and cats, so I cannot combine them into one class.
Also I do not want to use a table for hierarchy, which will lead to duplication of a large amount of data A
source share