We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7cff2ae commit 1844b3eCopy full SHA for 1844b3e
parse/src/main/java/com/parse/ParseObject.java
@@ -590,7 +590,9 @@ protected boolean visit(Object node) {
590
// Check for cycles of new objects. Any such cycle means it will be
591
// impossible to save this collection of objects, so throw an exception.
592
if (object.getObjectId() != null) {
593
- seenNew = new HashSet<>();
+ if (!seenNew.isEmpty()) {
594
+ seenNew = new HashSet<>();
595
+ }
596
} else {
597
if (seenNew.contains(object)) {
598
throw new RuntimeException("Found a circular dependency while saving.");
@@ -605,7 +607,6 @@ protected boolean visit(Object node) {
605
607
if (seen.contains(object)) {
606
608
return true;
609
}
- seen = new HashSet<>(seen);
610
seen.add(object);
611
612
// Recurse into this object's children looking for dirty children.
0 commit comments