问题
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