Bmob Pointer 一对多约束查询
笔记详情表Notes

分类表classification

实现效果查询出,笔记详情表Notes中和分类表中 aaa 分类关联的数据
- 其中 aaa 的 objectId 为 8kvYcccq
代码实现
const pointer = Bmob.Pointer('classification')
//poiID 为 Notes表 的 Pointer对象 关联的分类表aaa的objectId
const poiID = pointer.set('8kvYcccq')
//查询笔记详情表 中 和分类表aaa有关的数据有关的
const query = Bmob.Query('Notes')
// 笔记详情表Pointer类型 字段 名称 和 Pointer类型指向的分类表objectId
query.equalTo("title", "==", poiID);
query.find().then(res => {
console.log(res)
})
查询结果


浙公网安备 33010602011771号