Hi,
Did you try orphan deleting from the leaf?
Say A has many B and B has many C and C has many D
Then some thing like this in A.java
@OneToMany(...., orphanDelete=true)
List bs;
void deleteChildren() {
for (B b : bs) b.deleteChildren();
bs = null;
}
And in B.java
@OneToMany(...., orphanDelete=true)
List<C> cs;
void deleteChildren() {
for (C c : cs) c.deleteChildren();
cs = null;
}
And then at the application level,
A a = ...;
a.deleteChildren();
-----
Pinaki
--
View this message in context:
http://openjpa.208410.n2.nabble.com/Forcing-an-Object-to-be-always-inserted-updated-first-during-persist-merge-tp4990960p5006108.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.