JPA Criteria api join through embedded ID
问题 I have the following entities: @Entity @Table(name = "place_revision") public class PoiRevision { @OneToMany(mappedBy = "pk.revision", cascade = {CascadeType.ALL}) private Collection<PoiRevisionCategory> categoryMapping; // ... } @Entity @Table(name = "place_revision__category") @AssociationOverrides({ @AssociationOverride(name = "pk.revision", joinColumns = @JoinColumn(name = "place_revision_id")), @AssociationOverride(name = "pk.category", joinColumns = @JoinColumn(name = "category_id")) })