l***@aliyun.com
l***@aliyun.com
  • 发布:2025-04-13 17:34
  • 更新:2025-04-14 14:35
  • 阅读:57

uniCloud.databaseForJQL() 查询数据库,加上getOne: true 就报错

分类:uniCloud
const id = 'xxxxxxxx'  
const db = uniCloud.databaseForJQL()  
db.collection('uni-cms-articles')  
  .where({ _id: id })  
  get({ getOne: true })  
  then(res => {  
    console.log(res)  
  })

以上加了getOne: true 就会报错。

const id = 'xxxxxxxx'  
const db = uniCloud.databaseForJQL()  
db.collection('uni-cms-articles')  
  .where({ _id: id })  
  get()  
  then(res => {  
    console.log(res)  
  })

但是去掉 getOne: true 就返回正常

2025-04-13 17:34 负责人:无 分享
已邀请:
套马杆的套子

套马杆的套子 - 没有解决不了的问题,只有解决不完的问题

你在jql查询.jql中试试呢?
你看我附件,我试了下是可以的

DCloud_uniCloud_CRL

DCloud_uniCloud_CRL

提供一下云函数日志看下。

要回复问题请先登录注册