1
- 发布:2022-09-02 23:39
- 更新:2022-10-18 15:12
- 阅读:384
产品分类: uniCloud/腾讯云
操作步骤:
预期结果:
1
1
实际结果:
1
1
bug描述:
unicloud-db使用getTemp链表查询
过滤字段 strLenCP(title) as title_length,create_date
排序 title_length asc,create_date asc
结果 title_length排序未生效,create_date有生效
PenGuin1 (作者)
orderby="title_length asc" page-size="15" @load="handleLoad"
v-slot:default="{data, pagination, loading, hasMore, error, options}"
>
----------------------------------------------------------------------------------------------------
dbCollection() {
return [
db.collection('qp-quot-list').where(
in('${this.tagid}', tags)
).getTemp(),db.collection('qp-quot-collect').where(
user_id==$cloudEnv_uid
).getTemp(),]
},
----------------------------------------------------------------------------------------------------
-问题描述:使用title_length排序未生效;如果collection直接使用’qp-quot-list‘,排序生效;
PenGuin1 (作者)
实现需求:文章列表页判断每条数据用户是否收藏
qp-quot-collect副表quot_id指向主表_id
"properties": {
"_id": {
"description": "ID,系统自动生成"
},
"quot_id": {
"bsonType": "string",
"description": "文案id",
"foreignKey": "qp-quot-list._id"
},
"user_id": {
"bsonType": "string",
"description": "收藏者id,参考uni-id-users表",
"forceDefaultValue": {
"$env": "uid"
},
"foreignKey": "uni-id-users._id"
},
"create_date": {
"bsonType": "timestamp",
"description": "收藏时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
PenGuin1 (作者)
查询结果
{"
_id":{
"_value":"b69f67c06315f5db146fd84947b6ec0f",
"qp-quot-collect":[]
},
"title":"如果不爱我,就不要对我那么好,不然,我会自作多情的。",
"title_en":"",
"create_date":1662383578582,
"title_length":26,"
weight":0.0028890641587047128
}
PenGuin1 (作者)
已贴
2022-09-06 15:28