Hi,
I'm having a trouble in my application when trying to map superclass and subclass by OneToOne relationship. For example:
I have 2 classes: A and B, B extends A.
Code:
public class A {
private int id;
private String name;
}
public class B extends A {
private int age;
}
I want to map OneToOne between those 2 classes by their IDs, but I don't know how to put annotations on class B. Both of them have table in database and in each table, there's a ID column. Could you please help me to resolve this issue? Thank you very much.