Skip to content

Commit 410b60a

Browse files
GH-2704 - Always define __relationships__ parameter.
In #2668 storing of relationships has been optimised so that existing relationships are not always refetched. The new query always requires `__relationships__` to be present. In the case of relationships with defined properties, `Neo4jMappingContext#createStatementForRelationshipWithPropertiesBatch` only defines that argument for new relationships, so updating relationships with properties fails. Closes #2704
1 parent 02068ed commit 410b60a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/springframework/data/neo4j/core/mapping/Neo4jMappingContext.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,8 +613,8 @@ private CreateRelationshipStatementHolder createStatementForRelationshipWithProp
613613
getEntityConverter().write(relatedValue.getRelationshipProperties(), propMap);
614614
relationshipRows.add(propMap);
615615
}
616-
relationshipPropertiesEntries.put(Constants.NAME_OF_RELATIONSHIP_LIST_PARAM, relationshipRows);
617616
}
617+
relationshipPropertiesEntries.put(Constants.NAME_OF_RELATIONSHIP_LIST_PARAM, relationshipRows);
618618
return new CreateRelationshipStatementHolder(relationshipCreationQuery, relationshipPropertiesEntries);
619619
}
620620

0 commit comments

Comments
 (0)