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
825 stars 619 forks source link

Dynamic embedded/nested properties [DATAGRAPH-1347] #1909

Closed spring-projects-issues closed 3 years ago

spring-projects-issues commented 4 years ago

Gerrit Meier opened DATAGRAPH-1347 and commented

it would be great to have dynamic-properties option such as OGM annotation @Properties

[Neo4j-OGM manual](https://neo4j.com/docs/ogm-manual/current/reference/#reference:annotating-entities:node-entity:dynamic-properties)


Affects: 6.0 M2 (2020.0.0)

Reference URL: https://github.com/neo4j/sdn-rx/issues/213

Agh42 commented 3 years ago

Any new developments on this issue? I feel that missing the ability to easily save custom properties on a node (like it is possible with OGM or native Cypher queries) is a major miss in an otherwise excellent library. Is there any proposed way of how to save dynamic properties on individual nodes while using SDN-RX?

meistermeier commented 3 years ago

Thanks for the friendly overall feedback :) I think that the existence of @CompositeProperty (https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#custom.conversions.composite-properties) might brighten your day. An example domain class annotated with the composite properties can be found here: https://github.com/spring-projects/spring-data-neo4j/blob/872a53648bb3e63f02e981482d60340ad2a6c73e/src/test/java/org/springframework/data/neo4j/integration/shared/conversion/ThingWithCompositeProperties.java If this is not what you are looking for feature-wise, I leave the ticket open for feedback.

Agh42 commented 3 years ago

This is exactly what I was looking for - damn I looked up and down through the reference docs and missed it. Thanks a lot!!

meistermeier commented 3 years ago

Thanks for your feedback.

michael-simons commented 3 years ago

For completeness, we also have @DynamicLabels and dynamic relationships.