{code} @ManyToOne( fetch=FetchType.LAZY ) @JoinTable(name="CATEGORY_PRODUCT", uniqueConstraints = @UniqueConstraint(columnNames = {"PDID", "CATID"}), joinColumns = @JoinColumn(name="PDID"), inverseJoinColumns = @JoinColumn(name="CATID") ) @WhereJoinTable(clause="CATMAIN=1") protected Category getMainCategory() { return mainCategory; } protected void setMainCategories(Category mainCategory) { this.mainCategory = mainCategory; } Best regards, Victor {code} |
|