@Entity(name = "EntityA")
public static class EntityA {
@EmbeddedId
private EntityId id;
@ElementCollection
public Set<EmbeddableA> elementCollection = new HashSet<>();
}
@Embeddable
public static class EntityId implements Serializable {
private String id1;
}
throws `java.lang.ClassCastException: class org.hibernate.metamodel.mapping.internal.EmbeddedForeignKeyDescriptor cannot be cast to class org.hibernate.metamodel.mapping.internal.SimpleForeignKeyDescriptor`