test.schema.json
···
{
"bsonType": "object",
"required": [],
"permission": {
"read": false,
"create": false,
"update": false,
"delete": false
},
"properties": {
"_id": {
"description": "ID,系统自动生成"
},
"name":{
"bsonType": "string",
"title": "姓名",
"trim": "both",
"minLength": 2
},
"parent_id":{
"bsonType": "string",
"title": "父id",
"parentKey": "_id"
},
"mother_id":{
"bsonType": "string",
"title": "母id",
"parentKey": "_id"
},
"teacher_id":{
"bsonType": "string",
"title": "师傅id",
"parentKey": "_id"
}
}
}
···
查询代码:
db.collection("test")
.parentKey("parent_id")
.get({getTree: {
startWith:"/张三/i.test('name')"
}
})
1 个回复
DCloud_uniCloud_WYQ
此问题已在HBuilderX 3.5.5修复