使用Firestore,如何编写查询以查找具有undefined字段的文档?
例如,这是一个带有两个文档的firestore集合:
{
users: { // <- the collection
a: { // <- the document
active: true,
profile: {
first_name: 'Homer',
last_name: 'Simpson',
}
},
b:
active: true
}
}
}
Run Code Online (Sandbox Code Playgroud)
(以下是来自Firestore控制台的屏幕截图): 文档“ a” ,文档“ b”
鉴于上述的Firestore数据,我想执行以下操作:(
firestore().collection('users').where('profile', '==', undefined)这不是对Firestore的有效查询)
如何编写查询以检索不存在users某个字段(profile)的所有文档()?
谢谢!