简体   繁体   English

Neo4j无法正确保存标签

[英]Neo4j not saving Label correctly

I am using Spring to add some nodes into my neo4j database. 我正在使用Spring将一些节点添加到我的neo4j数据库中。 When I save a 'Person' node, I notice that it gets saved twice. 保存“人”节点时,我注意到它被保存了两次。 Once as a "Person" and another time as a "_Person". 一次作为“人员”,另一次作为“ _Person”。

Anyone know why that is? 有人知道为什么吗?

That's the documented and expected behaviour. 这就是记录的和预期的行为。 RTFM (read the fine manual) at http://docs.spring.io/spring-data/data-neo4j/docs/3.2.1.RELEASE/reference/html/#reference_programming-model_typerepresentationstrategy : RTFM(请阅读高级手册), 网址http://docs.spring.io/spring-data/data-neo4j/docs/3.2.1.RELEASE/reference/html/#reference_programming-model_typerepresentationstrategy

Each node gets labeled with its type and all supertypes and interfaces that are also @NodeEntity-annotated. 每个节点都用其类型以及也带有@NodeEntity注释的所有超类型和接口进行标记。 There is a special Label prefixed with _ that represents the current type of the entity. 有一个特殊的Label前缀_,代表实体的当前类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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