Extra docs

Test with multiple relationships
This commit is contained in:
Ben Bosman
2022-04-06 18:46:51 +02:00
parent 5755ebc3e2
commit 805394ee85
3 changed files with 238 additions and 4 deletions

View File

@@ -226,6 +226,9 @@ public class RelationshipServiceImpl implements RelationshipService {
Item leftItem = relationship.getLeftItem();
Item rightItem = relationship.getRightItem();
// These list also include the non-latest. This is relevant to determine whether it's deleted.
// This can also imply there may be overlapping places, and/or the given relationship will overlap
// But the shift will allow this, and only happen when needed based on the latest status
List<Relationship> leftRelationships = findByItemAndRelationshipType(
context, leftItem, relationship.getRelationshipType(), true, -1, -1, false
);
@@ -260,6 +263,7 @@ public class RelationshipServiceImpl implements RelationshipService {
context.turnOffAuthorisationSystem();
//only shift if the place is relevant for the latest relationships
if (otherSideIsLatest(true, relationship.getLatestVersionStatus())) {
shiftSiblings(
relationship, true, oldLeftPlace, movedUpLeft, insertLeft, deletedFromLeft,