привет, у меня есть следующий код:
@Entity
public class VirtualMeasure extends AbstractMeasure implements Record {
@OneToMany(fetch = FetchType.LAZY, cascade = {CascadeType.REMOVE}, mappedBy
= "virtualMeasureMyActionId.virtualMeasure")
@Access(AccessType.FIELD)
private Set<VirtualMeasureMyAction> vmMyAction;
}
@Entity
@AssociationOverrides({
@AssociationOverride(name = "virtualMeasureMyActionId.virtualMeasure",
joinColumns = @JoinColumn(name = "virtualMeasureId")),
@AssociationOverride(name = "virtualMeasureMyActionId.myAction",
joinColumns = @JoinColumn(name = "myActionId")) })
public class VirtualMeasureMyAction implements Record {
/**
* virtualMeasureViewId : VirtualMeasureViewId
*/
@EmbeddedId
private VirtualMeasureMyActionId virtualMeasureMyActionId;
}
@Embeddable
public class VirtualMeasureMyActionId implements Record {
@ManyToOne(fetch=FetchType.LAZY)
private VirtualMeasure virtualMeasure;
@ManyToOne(fetch=FetchType.LAZY)
private MyAction myAction;
}
где я запускаю, я получаю эту ошибку [создать]: javax.persistence.PersistenceException: org.hibernate.HibernateException: найдено два представления одной коллекции: vmMyAction