spring-projects / spring-data-neo4j

Provide support to increase developer productivity in Java when using Neo4j. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
http://spring.io/projects/spring-data-neo4j
Apache License 2.0
828 stars 620 forks source link

cannot create two unique label indices on NodeEntity [DATAGRAPH-494] #1057

Closed spring-projects-issues closed 7 years ago

spring-projects-issues commented 10 years ago

Kris Zawadzki opened DATAGRAPH-494 and commented

I have two properties in my entity, both indexed with unique constraint. indexes are label-type. spring complains:

Caused by: org.springframework.data.mapping.model.MappingException: Duplicate unique property [...] Only one unique property is allowed per type at org.springframework.data.neo4j.support.mapping.Neo4jPersistentEntityImpl$1.doWithPersistentProperty(Neo4jPersistentEntityImpl.java:84)

This seems to be some old limitation that has been removed for label indices. java api works w/o problems (after removing @Index annotation) template.getGraphDatabaseService().schema().constraintFor(DynamicLabel.label("User")).assertPropertyIsUnique("nick").create();


Affects: 3.1.1 (Dijkstra SR1)

spring-projects-issues commented 7 years ago

Nicolas Mervaillie commented

In order to give users a better vision of what’s happening on SDN, we are bulk closing several issues because they are no more relevant, or related to old and un-maintained SDN versions. We tried to keep the issues that are still relevant, like feature requests that are still absent from SDN. However, some may have been closed by error. If so, please feel free to reopen.