#709 - Refactor: BeanCollection internals, rename method isEmptyAndUntouched() to isSkipSave(), remove 'touched' flag

This commit is contained in:
Robin Bygrave committed 2016-05-18 11:19:01 +12:00
1 parent 1c9b974427
commit 362ceea79b
8 files changed
+32 -65

No files matched your search

@@ -806,8 +806,8 @@ public final class DefaultPersister implements Persister {
// many's with cascade save
BeanPropertyAssocMany<?>[] manys = desc.propertiesManySave();
for (int i = 0; i < manys.length; i++) {
// check that property is loaded and not empty uninitialised collection
if (request.isLoadedProperty(manys[i]) && !manys[i].isEmptyBeanCollection(parentBean, insertedParent)) {
// check that property is loaded and collection should be cascaded to
if (request.isLoadedProperty(manys[i]) && !manys[i].isSkipSaveBeanCollection(parentBean, insertedParent)) {
saveMany(new SaveManyPropRequest(insertedParent, manys[i], parentBean, request), insertMode);
if (!insertedParent) {
request.addUpdatedManyProperty(manys[i]);