#431 - Annotation PrivateOwned seems not enough to update an change in the list of children (fix)

This commit is contained in:
Robin Bygrave
2015-10-22 11:10:41 +13:00
parent 409e2b75ce
commit 0351eab3a7
2 changed files with 22 additions and 0 deletions
@@ -643,6 +643,15 @@ public final class DefaultPersister implements Persister {
private boolean isCascade() {
return cascade;
}
public void modifyListenReset(BeanCollection<?> c) {
if (insertedParent) {
// after insert set the modify listening mode
// for private owned etc
c.setModifyListening(many.getModifyListenMode());
}
c.modifyReset();
}
}
private void saveMany(SaveManyPropRequest saveMany, boolean insertMode) {
@@ -684,6 +693,7 @@ public final class DefaultPersister implements Persister {
BeanCollection<?> c = (BeanCollection<?>) details;
Set<?> modifyRemovals = c.getModifyRemovals();
saveMany.modifyListenReset(c);
if (modifyRemovals != null && !modifyRemovals.isEmpty()) {
SpiTransaction t = saveMany.getTransaction();