We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 797786f commit 037875fCopy full SHA for 037875f
parse/src/main/java/com/parse/ParseObject.java
@@ -606,7 +606,9 @@ protected boolean visit(Object node) {
606
// Check for cycles of new objects. Any such cycle means it will be
607
// impossible to save this collection of objects, so throw an exception.
608
if (object.getObjectId() != null) {
609
- seenNew = new HashSet<>();
+ if (!seenNew.isEmpty()) {
610
+ seenNew = new HashSet<>();
611
+ }
612
} else {
613
if (seenNew.contains(object)) {
614
throw new RuntimeException("Found a circular dependency while saving.");
@@ -621,7 +623,6 @@ protected boolean visit(Object node) {
621
623
if (seen.contains(object)) {
622
624
return true;
625
}
- seen = new HashSet<>(seen);
626
seen.add(object);
627
628
// Recurse into this object's children looking for dirty children.
0 commit comments