Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify query depth of Spring data neo4j?

Spring Data Neo4j provided a way to specify the query depth:

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

But it's hardcoded, is there any other ways to specify the depth as an argument of the method just like:

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

Thanks.

like image 955
Redf Xu YxMadOC Avatar asked Oct 23 '25 16:10

Redf Xu YxMadOC


1 Answers

You could try to annotate the parameter.

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

Find more here : https://docs.spring.io/spring-data/neo4j/docs/current/reference/html/#reference_derived-queries

like image 188
Paulin Amougou Avatar answered Oct 26 '25 04:10

Paulin Amougou