Hi,

We were exploring a similar thing last week. I've written it up here 
- 
http://www.markhneedham.com/blog/2013/12/23/neo4j-cypher-using-merge-with-schema-indexesconstraints/

But as Michael says, unique constraint is the way to go for this type of 
thing but once a Member is created with a specific id then merging on it 
will not create a duplicate node even if you're only using a non-unique 
index.

Mark

On Monday, 23 December 2013 01:00:34 UTC, Javad Karabi wrote:
>
> if i have 2 cypher query posts to neo4j
>
> "MERGE a:Member( {id: {member_id} })" , member_id: 5
>
> "MERGE a:Member( {id: {member_id} })" , member_id: 5
>
> with both of these posts occurring simultaneously, is it possible to have 
> 2 nodes created, instead of just the one?
> that is, if the first merge was interrupted halfway though, and had not 
> completed yet, the second then creates a new one since it doesnt see the 
> first...
> is this something that could potentially happen?
>
> on a related note, how would i enforce uniqueness on Member(id) ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to