如何使用 strongloop 过滤 include 'model' 中的数据

how to filter data in include 'model' using strongloop

我正在尝试将 table ABC 加入 XYZ,并使用 Strongloop 过滤包含的 table 'xyz' 的数据

我的代码是:

 return ABC.find({filter:{ 
                    where: {abcPropertyName: {neq: '1234'}}, 
                    include: {**XYZ**: *[{xyzPropertyName: 'somevalue'}]*}}}).$promise

我的数据源是:

____abc.json____

"relations": {
    "xyz": {
      "type": "hasOne",
      "model": "xyz",
      "foreignKey": "abcId"
    }

____xyz.json____

"relations": {
    "abc": {
      "type": "blongsTo",
      "model": "abc",
      "foreignKey": "abcId"
    }

问题: 'xyz' 中的过滤器不工作。请帮忙。提前致谢

尝试使用以下包含过滤器:

include: { 
    relation: **XYZ**, 
    scope: {
      where: {xyzPropertyName: 'somevalue'} 
    }
}

Reference