【发布时间】:2020-11-06 01:12:26
【问题描述】:
我想通过包含模型的 where 条件获得包含关系的结果。
return this.htcApi.find({
include: [
{
relation: 'nmos',
scope: {
include: 'countries',
},
},
],
where: { name:'Welcome', "nmos.name":'agile'}
});
此where 是htc 模型名称的条件工作,不适用于noms 模块。
我想要像这样的查询
Select htc.*, nmos.* FROM htc LEFT JOIN nmos ON nmos.id = htc.n_id where htc.name = 'abc' and nmos.name = 'abc';
如何在“关系”表上添加 where 条件?
【问题讨论】:
标签: mysql node.js loopbackjs loopback