Я не понимаю, почему я все еще получаю hibernate.MappingException :
Repeated column in mapping for entity: PanelCategoryOption column: category_id (should be mapped with insert="false" update="false")
PanelCategoryOption mapping
@Entity
@Table(name = "eq_panel_category_option")
public class PanelCategoryOption {
@EmbeddedId
private PanelCategoryOptionId id;
}
PanelCategoryOptionId mapping
@Embeddable
public class PanelCategoryOptionId implements Serializable {
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "panel_id", referencedColumnName = "panel_id"),
@JoinColumn(name = "category_id", referencedColumnName = "category_id")})
private PanelCategory panelCategory;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumns({
@JoinColumn(name = "category_option_id", referencedColumnName = "id", insertable = false, updatable = false),
@JoinColumn(name = "category_id", referencedColumnName = "category_id", insertable = false, updatable = false)})
private CategoryOption categoryOption;
}
Схема