查询语句如下:db.collection('course_package,teachers').get()
查询结果如下: SYNTAX_ERROR 未找到主表与副表之间的关联关系
course_package表结构定义如下:{
"bsonType": "object",
"required": [],
"permission": {
"read": true,
"create": true,
"update": true,
"delete": true
},
"properties": {
"_id": {
"description": "ID,系统自动生成"
}
},
"teacher_id": {
"bsonType": "string",
"foreignKey": "teachers._id"
},
"assistant_teacher_ids": {
"bsonType": "array",
}}
teachers表结构如下:
{
"bsonType": "object",
"required": [],
"permission": {
"read": true,
"create": true,
"update": true,
"delete": true
},
"properties": {
"_id": {
"description": "ID,系统自动生成"
}
},
"username": {
"bsonType": "string"
}
}
会飞的小旋风
我也是同样的表结构,一直报这个错误
2022-02-18 13:12