const db = uniCloud.databaseForJQL()
const order = db.collection('order').getTemp() // 注意结尾的方法是getTemp,对order表过滤得到临时表
const res = db.collection(order,'book').get().then(res=>{
console.log(res);
})
Hookin丶
- 发布:2024-01-14 11:39
- 更新:2024-01-27 19:54
- 阅读:477
产品分类: uniCloud/支付宝小程序云
示例代码:
操作步骤:
const db = uniCloud.databaseForJQL()
const order = db.collection('order').getTemp() // 注意结尾的方法是getTemp,对order表过滤得到临时表
const res = db.collection(order,'book').get().then(res=>{
console.log(res);
})
const db = uniCloud.databaseForJQL()
const order = db.collection('order').getTemp() // 注意结尾的方法是getTemp,对order表过滤得到临时表
const res = db.collection(order,'book').get().then(res=>{
console.log(res);
})
预期结果:
不报错
不报错
实际结果:
{
"code": "SYSTEM_ERROR",
"errCode": "SYSTEM_ERROR",
"message": "Cannot read properties of null (reading 'lastCmd')",
"errMsg": "Cannot read properties of null (reading 'lastCmd')",
"systemInfo": []
}
{
"code": "SYSTEM_ERROR",
"errCode": "SYSTEM_ERROR",
"message": "Cannot read properties of null (reading 'lastCmd')",
"errMsg": "Cannot read properties of null (reading 'lastCmd')",
"systemInfo": []
}
bug描述:
参考文档:https://doc.dcloud.net.cn/uniCloud/jql.html#lookup
编写联表查询