I am using DynamicProperties Spring Data Neo4j 3.x. I miss this class in Spring Data Neo4j 4.0.0.M1 (SDN4). Do I have a new concept in SDN4 for storing dynamic property values?
The DynamicProperties property in @NodeEntity saves all its properties dynamically based on the node itself.
The key / value pair of the DynamicProperties element is stored in a node with keys prefixed with the property name, which is returned by delegation FieldAccessorFactory # getNeo4jPropertyName (field).
NodeEntity class Person { String name; DynamicProperties personalProperties = new DynamicPropertiesContainer(); } Person p = new Person(); p.persist(); p.personalProperties.setProperty("ZIP", 8000); p.personalProperties.setProperty("City", "Zuerich");
leads to node with properties:
"personalProperties-ZIP" => 8000 "personalProperties-City" => "Zuerich"
source share