【问题标题】:SDN 4 Neo4j own primary key and id() functionSDN 4 Neo4j 自己的主键和 id() 函数
【发布时间】:2017-02-22 13:10:57
【问题描述】:

我已将 uuid 属性添加到我的 SDN 4 Base 实体中,所以现在它看起来像:

@NodeEntity
public abstract class BaseEntity {

    @GraphId
    private Long id;

    @Index(unique = true, primary = true)
    private Long uuid;

...
}

现在当我使用 Neo4j Cypher id() 函数时,这个 id(baseEntity) 函数将考虑什么值 - 来自 Long idLong uuid

【问题讨论】:

    标签: neo4j cypher spring-data-neo4j-4


    【解决方案1】:

    Cypher 的 id() 函数始终使用内部 id(注释为 @GraphId)而不是任何自定义 id。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-05-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-09
      • 1970-01-01
      • 2017-07-02
      • 1970-01-01
      相关资源
      最近更新 更多