如何控制自定义 Spring Data Neo4j 存储库方法的深度? [英] How to control depth on custom Spring Data Neo4j repository methods?

查看:30
本文介绍了如何控制自定义 Spring Data Neo4j 存储库方法的深度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,如果我想按名称获取用户列表:

For example, if I want to get list of users by name:

class UserRepository extands GraphRepository<User> {

    List<User> findByName(String name);
}

那么如何设置加载深度为2呢?

then how to set loading depth to 2?

我试图在 SDN 4.0.0 中找到答案.RC2 文档,但它不包含有关此问题的任何内容.

I tried to find answer in the SDN 4.0.0.RC2 docs, but it isn't contains anything about this issue.

推荐答案

派生查找器尚不支持深度.如果适用,您必须编写自定义查询或在 Neo4jTemplate 上使用 loadAllByProperty 方法.

Derived finders do not yet support a depth. You'll have to write a custom query or use the loadAllByProperty method on the Neo4jTemplate if applicable.

文档中应该已经提到了,我们会添加它.

This should have been mentioned in the docs, we'll add it.

这篇关于如何控制自定义 Spring Data Neo4j 存储库方法的深度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆