Imagine a query like this:
match (i:QuestionOrder)
set i.count=i.count+1
merge (q:Question {text: '+text here+', index: i.count})
return q
Neo4j guarantees write locks if sets occur within the same transaction which is implied by the same query in node-neo4j. However, I'm getting the following output:
[
{
"columns":["q"],
"data":[{"text":"Have Kids...","index":1,"_id":542}]
},
{
"columns":["q"],
"data":[{"text":"You are...","index":1,"_id":545}]
}
]
From my understanding, a lock should prevent index
from being the same. Am I missing something here? How can I resolve this?