我正在将一个hibernate实体映射到一个表,比如ABC,我声明了@SecondaryTable
,比如说XYZ。
@Entity
@Table(name = "ABC")
@SecondaryTables({ @SecondaryTable(name = "XYZ", pkJoinColumns = @PrimaryKeyJoinColumn(name = "xyz", referencedColumnName = "abc")) })
public class AbcClass {
//...some atributes
@Column(table = "XYZ", name = "xyz")
private String abcDesc;
//...getter setters
}
现在,如果我从表ABC中删除一行,我不希望它级联到XYZ。 我怎么能这样做?