Skip to content

Commit 44bff12

Browse files
ToMany: drop unused parameter.
Follow-up to Markus 21.01.2018 20:30 ToMany: fix removal of non-persisted entities for stand-alone relations (removeStandaloneRelations removes non-persisted entities first)
1 parent c689ab8 commit 44bff12

File tree

1 file changed

+3
-3
lines changed
  • objectbox-java/src/main/java/io/objectbox/relation

1 file changed

+3
-3
lines changed

objectbox-java/src/main/java/io/objectbox/relation/ToMany.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ public void internalApplyToDb(Cursor sourceCursor, Cursor<TARGET> targetCursor)
837837
removeStandaloneRelations(sourceCursor, entityId, removedStandalone, targetIdGetter);
838838
}
839839
if (addedStandalone != null) {
840-
addStandaloneRelations(sourceCursor, entityId, addedStandalone, targetIdGetter, false);
840+
addStandaloneRelations(sourceCursor, entityId, addedStandalone, targetIdGetter);
841841
}
842842
}
843843
}
@@ -866,7 +866,7 @@ private void removeStandaloneRelations(Cursor cursor, long sourceEntityId, List<
866866

867867
/** The target array may not contain non-persisted entities. */
868868
private void addStandaloneRelations(Cursor cursor, long sourceEntityId, TARGET[] added,
869-
IdGetter<TARGET> targetIdGetter, boolean remove) {
869+
IdGetter<TARGET> targetIdGetter) {
870870
int length = added.length;
871871
long[] targetIds = new long[length];
872872
for (int i = 0; i < length; i++) {
@@ -877,7 +877,7 @@ private void addStandaloneRelations(Cursor cursor, long sourceEntityId, TARGET[]
877877
}
878878
targetIds[i] = targetId;
879879
}
880-
cursor.modifyRelations(relationInfo.relationId, sourceEntityId, targetIds, remove);
880+
cursor.modifyRelations(relationInfo.relationId, sourceEntityId, targetIds, false);
881881
}
882882

883883
/** For tests */

0 commit comments

Comments
 (0)