[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] @PrivateOwned is not deleting records in one-to-many (unidirectional) join table
|
I've problem with @PrivateOwned as it is not deleting the mapping records in the Join table for an unidirectional one-to-many association (to be specific, this one-to-many association is a self one, meaning to the same table)
Below is the config I'm using
@Entity
@Table("CONTERM")
public class Contract extends BasicEntity {
private String name;
@OneToOne
@JoinColumn(name="PARENT_ID", referencedColumnName="ID")
private Contract parent;
@OneToMany(cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
@PrivateOwned
private List<Contract> child;
.....
}
Deletes for the child records were issued, but failed to delete the join table rows and giving constraint error.
com.ibm.db2.jcc.am.fo: DB2 SQL Error: SQLCODE=-532, SQLSTATE=23504, SQLERRMC=DB2USR.CONTERM_CONTERM.FK_CONTERM_CONTERM_CHILD_ID, DRIVER=3.57.82
at com.ibm.db2.jcc.am.bd.a(bd.java:672)
at com.ibm.db2.jcc.am.bd.a(bd.java:60)
at com.ibm.db2.jcc.am.bd.a(bd.java:127)
I am using EclipseLink1.1 & DB2 v9.7
Thanks for any info.
Venki