【问题标题】:How to select fields from related tables in dreamfactory如何从dreamfactory中的相关表中选择字段
【发布时间】:2020-05-09 02:37:37
【问题描述】:

我正在使用 DreamFactory Schema 和 API Docs。在架构中,我添加了一个“虚拟关系”。现在在 API Docs 中,我将虚拟关系的名称关联起来,执行时一切都很好。我将从相关表中获取字段。但我不需要连接表中的所有字段。如何只选择我需要的字段?我尝试在"fields" 下添加"name_of_related.field"

错误:

"message": "请求的字段无效:fe_users_by_fe_user_id.username"

【问题讨论】:

    标签: select relationship virtual dreamfactory


    【解决方案1】:

    添加<relation_name>.fields=fieldname1,fieldname2

    就我而言:

    /api/v2/myservice/_table/mytable?fields=uid,tstamp&related=fe_users_by_fe_user_id&fe_users_by_fe_user_id.fields=username
    

    【讨论】:

      猜你喜欢
      • 2016-05-01
      • 1970-01-01
      • 2020-07-16
      • 2015-12-24
      • 2018-11-20
      • 1970-01-01
      • 2016-04-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多