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

查看:403
本文介绍了如何控制自定义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天全站免登陆