Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DynamicProperties in Spring Data Neo4j 4

I'm using DynamicProperties of Spring Data Neo4j 3.x. I'm missing this class in Spring Data Neo4j 4.0.0.M1 (SDN4). I there a new concept in SDN4 to store dynamic property values?

A DynamicProperties property on a @NodeEntity stores all its properties dynamically on the underlying node itself.

The key/value pairs of the DynamicProperties member are stored on the node with the keys prefixed with the property name that is returned by DelegatingFieldAccessorFactory#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");

results in a node with the properties:

 "personalProperties-ZIP" => 8000
 "personalProperties-City" => "Zuerich"
like image 356
uı6ʎɹnɯ ꞁəıuɐp Avatar asked Sep 29 '22 10:09

uı6ʎɹnɯ ꞁəıuɐp


1 Answers

Please see

https://jira.spring.io/browse/DATAGRAPH-555

At the moment, our primary concern is fixing bugs, and addressing core missing functionality, but this feature is under discussion to be included as soon as possible. We will need to do some design work in order to implement it, because the underlying architecture of SDN has changed considerably in SDN 4.

Please feel free to comment on the above ticket, and to up-vote it.

like image 94
Vince Avatar answered Oct 03 '22 03:10

Vince