How to map collection of each subclass from same hierarchy onto one owning class?
Does anyone know how to map a collection of each subclass from the same hierarchy onto one owning class, using JPA 2.0 annotations, backed by Hibernate 4.0.0.Final? Bit convoluted, so here's an example. Hierarchy classes look like this: @Entity @Cacheable(true) @Table(name = "hierarcicals") @Inheritance(strategy=InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "class", discriminatorType = DiscriminatorType.STRING) public abstract class MySuperClass { ... @Entity @DiscriminatorValue("SubClassOne") public class SubClassOne extends MySuperClass { ... @ManyToOne(fetch = FetchType.LAZY)