3
我很困惑,为什么我得到这个Cypher语句的问题,当我对位置节点的地址有一个唯一的约束,但我正在使用一个合并,应该发现,如果它存在并且仅返回该表述的其余部分的id。我错过了什么?Cypher'Node已经存在问题与MERGE
这里是我的发言:
MERGE(l:Location{location_name:"Starbucks", address:"36350 Van Dyke Ave", city: "Sterling Heights",state: "MI", zip_code:"48312",type:"location",room_number:"",long:-83.028889,lat:42.561152})
CREATE(m:Meetup{meet_date:1455984000,access:"Private",status:"Active",type:"project",did_happen:"",topic:"New features for StudyUup",agenda:"This is a brainstorming session to come with with new ideas for the companion website, StudyUup. Using MatchUup as the base, what should be added, removed, or modified? Bring your thinking caps and ideas!"})
WITH m,l
MATCH (g:Project{title_slug:"studyuup"}) MATCH (p:Person{username:"wkolcz"})
WITH m,l,g,p
MERGE (g)-[:CREATED {rating:0}]->(m)
MERGE (m)-[:MEETUP_AT {rating:0}]->(l)-[:HOSTED_MEETUP]->(m)
MERGE (m)<-[:ATTENDING]-(p)
RETURN id(m) as meeting_id
我越来越:
Node 416 already exists with label Location and property "address"=[36350 Van Dyke Ave]
嘿妮可!感谢您的洞察力。我意识到我必须添加一个额外的属性(或删除一个),导致只有部分匹配,然后导致与约束的冲突。谢谢! –
这是一个超级有用的答案,我在尝试一个抱怨的LOAD CSV后找到了答案。 – vielmetti