Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-26-2018 10:39 PM
I have an unique constraints on a node
ON ( business:Business ) ASSERT business.domain IS UNIQUE
I am trying to run query
MERGE (u:UserPublishers {domain: prospect.domain})
ON CREATE SET
u.id = prospect.id,
u.created = prospect.created,
u.domain = prospect.domain,
u.name = prospect.name,
u.email = prospect.email,
u += prospect.fields
ON MATCH SET
u += prospect.fields
When I run this I am getting error like
Node(10745858) already exists with label
Businessand property
domain= 'adinject.com'
Is there any other way to achieve the goal
08-27-2018 12:31 AM
Since the unique constraint is on label Business and property domain, can you do the MERGE also on that label (I'm assuming UserPublishers is a secondary label) ? Since there is no constraint on UserPublishers the MERGE is not doing what you think it's doing ...
Regards,
Tom
All the sessions of the conference are now available online