GoGM generated relationship deletion query is incorrect
nikitawootten opened this issue · 1 comments
nikitawootten commented
When gogm.Save()
is called on an object which has had a deleted relationship, the generated query looks like:
UNWIND $rows as row MATCH (start)-[e]->(end) WHERE id(start) = row.startNodeId and id(end) = row.endNodeIds DELETE e
The parameters look like this:
{rows:{startNodeId:<id>,endNodeIds:[<id>]}}
Notice that endNodeIds
is provided as a list, but the query constrains end
with id(end) = row.endNodeIds
.
The fix is simply changing id(end) = row.endNodeIds
to id(end) in row.endNodeIds
erictg commented
Fix is in master, will be released soon