本地有这个集合的schema文件,远程也有,总是会报数据库验证失败,
11:26:43.265 [本地调试]"VALIDATION_ERROR: 数据库验证失败:提交的字段[\"title\",\"gldw\",\"zzda\",\"zzdw\",\"phone\",\"start_time\",\"end_time\",\"read_end_time\",\"answer_start_time\",\"info\",\"xieyi1\",\"xieyi2\",\"status\"]在本地数据表的schema文件中不存在" D:/360%E5%AE%89%E5%85%A8%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%8B%E8%BD%BD/HBuilderX/plugins/unicloud/server/controller/cloudfunctions.js:1:785
是有缓存吗
表名 clound_sys
本地的 schema
请求参数
结果
clound_sys.schema.json 源码
{
"bsonType": "object",
"required": [],
"permission": {
"read": true,
"create": false,
"update": true,
"delete": false
},
"properties": {
"_id": {
"description": "ID,系统自动生成"
}
},
"title": {
"bsonType": "string",
"title": "平台名称"
},
"zzda": {
"bsonType": "string",
"title": "平台制作单位"
},
"zzdw": {
"bsonType": "string",
"title": "平台组织单位"
},
"gldw": {
"bsonType": "string",
"title": "平台管理单位"
},
"phone": {
"bsonType": "string",
"title": "平台联系电话"
},
"start_time": {
"bsonType": "timestamp",
"title": "活动开始时间"
},
"end_time": {
"bsonType": "timestamp",
"title": "活动结束时间"
},
"read_end_time": {
"bsonType": "int",
"title": "晨读结束时间"
},
"answer_start_time": {
"bsonType": "int",
"title": "晚练开始时间"
},
"info": {
"bsonType": "string",
"title": "活动介绍"
},
"xieyi1": {
"bsonType": "string",
"title": "用户协议"
},
"xieyi2": {
"bsonType": "string",
"title": "隐私协议"
},
"status": {
"bsonType": "int",
"description": "活动状态:0 正常 1 禁用",
"title": "用户状态",
"defaultValue": 0,
"enum": [{
"text": "正常",
"value": 0
}, {
"text": "禁用",
"value": 1
}]
}
}
刘艺 (作者)
问题是有的,如果没有缓存不知道是哪的问题
2021-07-06 11:14
刘艺 (作者)
我增加了更详细的描述,看有助于发现问题不
2021-07-06 11:33
DCloud_uniCloud_WYQ
回复 刘艺: 上面的schema是本地的还是云端的
2021-07-06 14:05
刘艺 (作者)
回复 DCloud_uniCloud_WYQ: 本地的
2021-07-06 17:08
DCloud_uniCloud_WYQ
回复 刘艺: 你的schema结构错了,所有的字段都在properties下
2021-07-07 14:40
刘艺 (作者)
回复 DCloud_uniCloud_WYQ: 尴尬
2021-07-07 15:35