Search code examples
neo4jspring-data-neo4jneo4j-ogm

Spring Data Neo4j @Properties annotation


I'm trying to port my legacy code to the latest version of Spring Data Neo4j and unable to find the following annotation:

@Properties (org.neo4j.ogm.annotation.Properties)

What should be used instead of this?


Solution

  • You would use the @CompositeProperty annotation. This will work with Map<String/Enum, Object>.

    Here is the link to the documentation with some further information. https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#custom.conversions.composite-properties