neo4j ogm不同的保存政策

时间:2017-04-04 07:40:34

标签: neo4j neo4j-ogm

是否有可能更改保存政策。

例如,我有节点Person,其属性名称为A,姓氏和地址。

现在我想保存具有相同实体ID的对象Person,并且属性名称为B.

我能以某种方式选择:

  1. 仅覆盖该名称属性并留下姓氏和地址。
  2. 删除姓氏和地址,只插入姓名= b。

1 个答案:

答案 0 :(得分:0)

No, these policies do not exist in the OGM. When you save a node entity, the OGM will detect if any properties have changed, and update all properties. If you've only updated the name to B, but left the surname and address as before, then the effect of save is to update the name to B. If you update name to B but set surname and address to null, then the effect of save is to update the name to B, and remove the values of surname and address.