花间一壶酒
花间一壶酒
  • 发布:2022-12-09 10:45
  • 更新:2022-12-09 11:33
  • 阅读:165

【报Bug】JQL orderBy无效

分类:uniCloud

产品分类: uniCloud/App

示例代码:

'''js
db.collection('opendb-news-articles').where({
"category_id": "62d766c0f6d1400001566da8"
}).field('timestampToDate(publish_date) as date').orderBy('publish_date','desc').limit(50).get();
'''

操作步骤:

collection opendb-news-article

预期结果:

返回结果正确排序

实际结果:

乱序

bug描述:

JQL查询, orderBy没有效果, 字段类型是timestamp

测试hbuilderx版本
3.6.12.20221207-alpha
3.6.5

2022-12-09 10:45 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ
  • 花间一壶酒 (作者)

    '''

    db.collection('opendb-news-articles').where({

    "category_id": "62d766c0f6d1400001566da8"

    }).field('timestampToDate(publish_date) as date').orderBy('publish_date desc').limit(50).get();

    '''js

    两种写法, 结果一样

    2022-12-09 11:37

  • DCloud_uniCloud_WYQ

    回复 花间一壶酒: field里面as之后应该按照as后的字段排序

    2022-12-09 11:39

  • 花间一壶酒 (作者)

    回复 DCloud_uniCloud_WYQ: 可以了, 谢谢您

    2022-12-09 12:01

要回复问题请先登录注册