Spring Data Neo4j Create duplicate nodes with underscore

。_饼干妹妹 提交于 2019-12-11 22:32:53

问题


When i am persisting nodes in database using spring data neo4j. it persist duplicate nodes like "person" and "_person". it both contains same data. so i want to stop this behaviour of sdn.

I am not using any inheritance and simply each class is having all properties.

Also if i insert data from neo4j server directly ,sdn is not getting it.


回答1:


The nodes are not being duplicated (you should see the same node ID on tour example person and _person). What you are seeing is the type representation strategy used by SDN to enable the class mapping.

I cannot remember exactly but I think you will get a label for each class in your Java type hierarchy and one underscore prefixed label for the concrete java type of the Node.

You can change this behaviour by providing your own indexing strategy, see the documentation here.



来源:https://stackoverflow.com/questions/26773454/spring-data-neo4j-create-duplicate-nodes-with-underscore

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