简体   繁体   English

Spring数据Neo4j中save()方法保存了什么?

[英]What does the save() method save in Spring Data Neo4j?

The question is that what does it save?问题是它保存了什么?

  • Only the entity?只有实体?
  • The entity and it's relationships?实体及其关系?
  • Does it saves the relationships and the other end of those relationships?它是否挽救了关系和这些关系的另一端?
  • Or does it save everything that the entity contains recursively and it acts as an anchor node?或者它是否递归地保存实体包含的所有内容并充当锚节点?

It saves the entire subgraph that you have, the entity you're calling the save() on acts as an anchor node.它保存了您拥有的整个子图,您调用save()的实体充当锚节点。 In other words, the save() function operates recursively, so changes made to any connected nodes or relationships will be saved as well.换句话说, save() function 递归操作,因此对任何连接的节点或关系所做的更改也将被保存。

The relationships and nodes that are not in the subgraph won't be affected.不在子图中的关系和节点不会受到影响。

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

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