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
This commit is contained in:
Michael Simons
2023-03-31 11:41:41 +02:00
parent 02752f2bba
commit c31bd5d7b0

View File

@@ -613,8 +613,8 @@ public final class Neo4jMappingContext extends AbstractMappingContext<Neo4jPersi
getEntityConverter().write(relatedValue.getRelationshipProperties(), propMap);
relationshipRows.add(propMap);
}
relationshipPropertiesEntries.put(Constants.NAME_OF_RELATIONSHIP_LIST_PARAM, relationshipRows);
}
relationshipPropertiesEntries.put(Constants.NAME_OF_RELATIONSHIP_LIST_PARAM, relationshipRows);
return new CreateRelationshipStatementHolder(relationshipCreationQuery, relationshipPropertiesEntries);
}