How to create unique constraint involving multiple properties in Neo4J

后端 未结 3 729
名媛妹妹
名媛妹妹 2020-12-10 11:02

I know I can create a unique constraint on a single property with Cypher like CREATE CONSTRAINT ON (p:Person) ASSERT p.name IS UNIQUE. But I was wondering wheth

3条回答
  •  时光说笑
    2020-12-10 11:20

    As of now, neo4j(v3.0.3) still does not support unique constraint with multiple properties. The reason behind this is: When a unique constraint is created it also creates an index on it and as indexes only allow one property, thus constraints can only be applied on one index.

提交回复
热议问题