DynamicProperties in Spring Data Neo4j 4

落花浮王杯 提交于 2019-12-22 06:46:57

问题


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"

回答1:


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.



来源:https://stackoverflow.com/questions/29297822/dynamicproperties-in-spring-data-neo4j-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!