2016-01-28 23 views

回答

4

不幸的不是。你現在可以做的最好的事情就是創建一個屬性,它連接你想要唯一標識的屬性並對其進行約束。

+0

謝謝布萊恩,會試試這個。 – RCS

+0

[這個有點相關的問題]的答案(http://stackoverflow.com/questions/22498054/how-to-create-unique-constraint-involving-multiple-properties-in-neo4j)提供了一個關於如何連接。 – cybersam

4

您可以使用數組屬性並在其上創建索引。

+0

謝謝frant,也會試試這個。 – RCS

0

截至目前,neo4j(v3.0.3)仍不支持具有多個屬性的唯一約束。這背後的原因是: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.