Spring Data Neo4j 提供了一种指定查询深度的方法:
@Depth(value = 2)
List<KNode> findByName(String name);
但是它是硬编码的,有没有其他方法可以将深度指定为方法的参数,就像:
List<KNode> findByName(String name, int depth);
谢谢。
最佳答案
您可以尝试注释参数。
List<KNode> findByName(String name, @Depth int depth);
在这里找到更多:https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#reference_derived-queries
关于neo4j - 如何指定Spring数据neo4j的查询深度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51054172/