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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user