Can you explain more detail about how to use the elementId for this use case?
I guess you mean delete by elementId? Won't it delete other node by accident? Since elementId is not unique.
Also In my previous example:
The first generated cypher will fail because id 1 already exist.
Btw I thought elementId is not safe to use outside the transaction?
I even open a question for it but no response yet.