【问题标题】:How to specify query depth of Spring data neo4j?如何指定Spring数据neo4j的查询深度?
【发布时间】:2018-06-27 03:33:29
【问题描述】:

Spring Data Neo4j 提供了一种指定查询深度的方法:

@Depth(value = 2)
List<KNode> findByName(String name);

但是它是硬编码的,有没有其他方法可以将深度指定为方法的参数,就像:

List<KNode> findByName(String name, int depth);

谢谢。

【问题讨论】:

    标签: neo4j spring-data-neo4j


    【解决方案1】:

    您可以尝试对参数进行注释。

    List<KNode> findByName(String name, @Depth int depth);
    

    在此处了解更多信息:https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#reference_derived-queries

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-11-30
      • 1970-01-01
      • 2014-01-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多