11
- 发布:2022-05-07 22:45
- 更新:2022-11-14 21:02
- 阅读:1536
产品分类: uniapp/H5
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: windows 10
HBuilderX类型: 正式
HBuilderX版本号: 3.4.8
浏览器平台: Chrome
浏览器版本: 99.0.4844.74
项目创建方式: HBuilderX
操作步骤:
预期结果:
11
11
实际结果:
11
11
bug描述:
"PERMISSION_ERROR: 禁止使用数据库内包含的字段名作为别名,产生冲突的数据表为:opendb-contacts,产生冲突的字段名称为:nation_china"
l***@qq.com - hello uni-xxx
我今天也遇到了这个问题,我的是这样解决的:
1、加上外键:"foreignKey": "opendb-nation-china._id"
2、enum中的"field"的值"_id as value, name as text",要value在前text在后,调换过来就不行
"nation_china": {
"bsonType": "string",
"title": "民族",
"order": 2,
"enum": {
"collection": "opendb-nation-china",
"field": "_id as value, name as text"
},
"foreignKey": "opendb-nation-china._id"
},
这样处理:
"nation": {
"bsonType": "string",
"title": "民族",
"description": "民族",
"order": 4,
"foreignKey": "opendb-nation-china.name",
"enum": {
"collection": "opendb-nation-china",
"orderby": "first_letter asc",
"field": "name as value, name as text"
},
"componentForEdit": {
"name": "uni-data-picker"
}
},
l***@163.com
谢谢 成功解决问题
2022-08-23 17:55
举止优雅的猪
谢谢 成功解决问题
2023-03-07 17:55