反复调用Neo4J SDN- 3.0.0 ExecutingRestAPI.getNodeById [英] Neo4J SDN- 3.0.0 ExecutingRestAPI.getNodeById is invoced repeatedly

查看:87
本文介绍了反复调用Neo4J SDN- 3.0.0 ExecutingRestAPI.getNodeById的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Neo4J-2.0.1和SDN-3.0.0.RELEASE.

I'm using Neo4J-2.0.1 and SDN - 3.0.0.RELEASE.

我有一个NodeEntity,如下:

I have a NodeEntity as follow:

@NodeEntity
public class Group {

@GraphId
Long id;

@Indexed(unique = true, indexType = IndexType.SIMPLE)
public String name;

public String property1;

public String property2;

public Group() {
}

public Group(String str) {
    name = str;
}
}

我有一个网上论坛存储库:

I have a groups repository :

public interface GroupsRepository extends GraphRepository<Group> {

Group getGroupByName(String name);
}

调用getGroupByName(...)方法后,

ExecutingRestAPI.getNodeById(...)

ExecutingRestAPI.getNodeById(...)

调用

方法作为组拥有的属性的数量.

method is invoked as the number of the properties that the Group has.

如何避免这种行为?

在后台执行其他查询吗?

Are there any additional queries being executed under the hood?

推荐答案

您目前无法避免此行为,它会分别加载相关实体. REST集成目前尚未完全优化.

You cannot avoid this behavior at the moment, it loads the dependent entities individually. The REST integration is currently not at all optimized.

这篇关于反复调用Neo4J SDN- 3.0.0 ExecutingRestAPI.getNodeById的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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