async shuju() {
let res = await db.collection('tong_baogao').aggregate()
.lookup({
from: 'taizhang',
localField: 'uid',
foreignField: '_id',
as: 'abc',
})
.end()
console.log(res,"看res")
}
产品分类: uniCloud/App
async shuju() {
let res = await db.collection('tong_baogao').aggregate()
.lookup({
from: 'taizhang',
localField: 'uid',
foreignField: '_id',
as: 'abc',
})
.end()
console.log(res,"看res")
}
暂无
出现查询结果
报错:
21:19:49.148 [本地运行:阿里云:ziliao]运行日志:
21:19:49.204 [本地运行:阿里云:ziliao]本地运行云对象【taizhang-shiwu】...
21:19:51.917 [本地运行]Error: lookup方法内只允许使用子查询(let+pipeline)方式