Ich habe ein Problem mit Hibernate Mapping für Composite-Klasse. Das Problem ist, dass ich 2 Klassen habe, die für 2 Tabellen begrenzt sind, auch habe ich dritte Klasse (Korb), der unterschiedliche Klassenarten enthalten kann.Hibernate Composite Class Mapping
abstract class Fruit {...}
@Entity
@Table
class Apple extends Fruit {...}
@Entity
@Table
class Orange extends Fruit{...}
@Entity
@Table
class Basket {
...
@Column
private FruitType fruit_type;
// I dont know how to map composite class here
// It has to be mapped for two tables simultaneously
// which table has to be bound, depends on field fruit_type
private Fruit fruit;
... }