I want to use mixed @Inheritance strategy, but Hibernate doesn't support it.
Is there any way to implement JOINED inheritance without actual class inheritance.
For example:
@Entity
@Table(name="A")
@Inheritance(strategy=InheritanceType.JOINED)
public class A {
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ID_SEQ")
private Long id;
//getters
//setters
}
@Entity
@Table(name="B")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
public class B {
@Id
private Long id;
//getters
//setters
}
So, basically in B
I just want to refer to @Id generated in A
without extending from A
.