hi,
i got the following error: org.hibernate.MappingException: Duplicate property mapping of _sectionTypesBackref found in SectionType.
My class SectionTypes:
Code:
@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public abstract class SectionType extends AbstractLongEntity {
private ContainerSection parentContainerSection;
private int orderNo;
@ManyToOne
@JoinColumn(name="parent_container_section_id", insertable = false, updatable = false, nullable=false)
@ForeignKey(name = "section_type_fk_container_section")
public ContainerSection getParentContainerSection() {
return this.parentContainerSection;
}
public void setParentContainerSection(ContainerSection parentContainerSection) {
this.parentContainerSection = parentContainerSection;
}
@Column(insertable = false, updatable = false)
public int getOrderNo() {
return this.orderNo;
}
public void setOrderNo(int orderNo) {
this.orderNo = orderNo;
}
...
AbstractLongEntity contains only an id.
My class ContainerSection:
Code:
@Entity
public class ContainerSection extends SectionType {
private List<SectionType> sectionTypes = new ArrayList<SectionType>(0);
@OneToMany
@JoinColumn(name="parent_container_section_id", nullable=false)
@IndexColumn(name = "orderNo")
public List<SectionType> getSectionTypes() {
return this.sectionTypes;
}
public void setSectionTypes(List<SectionType> sectionTypes) {
this.sectionTypes = sectionTypes;
}
does anyone have an idea, what i can do? thanks in advance.