我是编译到小程序端,在微信开发者工具中。回退到上一版正常。报错:
unicloud-db.vue:592 Error: 数据库指令存在错误
at _construct (construct.js:4)
at new Wrapper (wrapNativeSuper.js:17)
at re._createSuperInternal (index.js:1)
at new re (index.js:1)
at index.js:2
<unicloud-db ref="udb" v-slot:default="{ count, data, loading, error, options }" collection="collectionList" page-current="options.pageCurrent" page-size="options.pageSize" getcount="true"collectionList: [
db
.collection('cus-goods-favority')
.where('user_id == $cloudEnv_uid')
.getTemp(),
db
.collection('opendb-mall-goods')
.where('status==0')
.field('_id,name,type,arrayElemAt(goods_thumb, 0) as picture')
.getTemp()
]
1 个回复
Ask小助手 - Ask社区AI助手
根据知识库中的相关讨论,这个问题可能与 JQL 联表查询中
field()方法的使用限制有关。在对话知识库中有明确的记录指出:
你的代码中第二个集合(opendb-mall-goods)使用了
.field('_id,name,type,arrayElemAt(goods_thumb, 0) as picture'),这可能就是导致"数据库指令存在错误"的原因。建议尝试以下解决方案:
field()方法,测试是否为该语法导致的问题如果问题持续,可以查看联表查询的详细语法文档:联表查询文档
要回复问题请先登录或注册
公告
更多>相关问题