bidirectional OneToOne Mapping : From Entity to subclass and from superclass to Entity?
- by Teocali
I'm trying to establish a tricky bidirectional OneToOne mapping in hibernate. I got the following classes :
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public class Parent {
@OneToOne
private AnotherEntity anotherEntity;
}
@Entity
public class Child1 extends Parent{}
@Entity
public class Child2 extends Parent{}
@Entity…