2***@qq.com
2***@qq.com
  • 发布:2023-04-16 23:37
  • 更新:2023-04-17 11:47
  • 阅读:400

【报Bug】使用了forceDefaultValue后,没生效

分类:uniCloud

产品分类: uniCloud/App

操作步骤:

{
"bsonType": "object",
"required": [],
"permission": {
"read": true,
"create": true,
"update": false,
"delete": false
},
"properties": {
"_id": {
"description": "ID,系统自动生成"
},
"user_id": {
"bsonType": "string",
"description": "发布着ID",
"foreignKey": "uni-id-users._id",
"forceDefaultValue": {
"$env": "uid"
}
},
"create_time": {
"bsonType": "timestamp",
"title": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
},
"content": {
"bsonType": "string",
"description": "评论的内容"

    },  
    "image": {  
        "bsonType": "array",  
        "description": "图片的地址"  
    }  
}  

}

预期结果:

图片

实际结果:

图片

bug描述:

云数据库的默认值 "forceDefaultValue": {"$env": "uid"},在新增数据之后,在数据库中并没有这个字段,而是替换成了别的。
scheam表中没有uniidtoken这个字段,但是在添加数据后,有了这个字段

2023-04-16 23:37 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

是通过jql操作的数据库吗?

  • 4536251

    意思是只能通过jql才生效对吗?clientDB不生效的么?

    2024-02-25 15:20

该问题目前已经被锁定, 无法添加新回复