2

Spring Data Neo4j 3.2 had an @Indexed annotation that allowed for a uniqueness constraint which is gone from the 4.x code base.

The best I can tell historically there were two annotations:

import org.neo4j.ogm.annotation.Index;  // 4.0.0.M1
import org.springframework.data.neo4j.annotation.Indexed;  // 3.2

Neither of which appear in any of the later releases:

    <version>4.1.2.RELEASE</version>
    <version>4.1.3.BUILD-SNAPSHOT</version>
    <version>4.2.0.M1</version>

Is there a way to define uniqueness at the Java/Spring level on a field, or does this require working in Cypher and creating the constraint there?

Luanne
  • 19,145
  • 1
  • 39
  • 51
Mike Summers
  • 2,139
  • 3
  • 27
  • 57

1 Answers1

2

At the moment, SDN 4 does not support @Indexed. However, we will be supporting this in the near future and work is already underway.

For now though, the only way to do this is via Cypher.

Luanne
  • 19,145
  • 1
  • 39
  • 51