【问题标题】:How to fetch nested relations on Kinvey如何在 Kinvey 上获取嵌套关系
【发布时间】:2014-10-28 16:54:01
【问题描述】:

所以我正在使用连接到 Kinvey 后端的 AngularJs 应用程序。 www.kinvey.com

在 Kinvey 中,我们可以获取一个实体及其关系,如下所示:

var promise = $kinvey.DataStore.get('events', 'event-id', {
    relations : { location: 'locations' }
});

http://devcenter.kinvey.com/angular/guides/datastore#JoiningOperators

关系数据/获取

上面实际上是从事件集合中获取一个事件实体,它还获取与其关联的位置的数据(它们在不同的集合中),到目前为止,我们能够检索一个实体并且它是关联的实体...

现在如何检索这些位置的关联?
换句话说,我如何检索嵌套关联?

谢谢。

【问题讨论】:

    标签: angularjs kinvey


    【解决方案1】:

    像这样:

    $kinvey.DataStore.find('collection1', null, {
      relations: {
        name: "collection2",
        "name.name": "collection3"
      }
    });
    

    https://support.kinvey.com/discussion/201272198/nested-relations

    【讨论】:

      猜你喜欢
      • 2021-09-07
      • 2020-09-13
      • 2021-05-19
      • 2020-04-04
      • 2016-09-26
      • 2019-11-17
      • 1970-01-01
      • 2022-11-23
      • 2020-12-06
      相关资源
      最近更新 更多