简体   繁体   中英

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"

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM