我有三个表保存这些文档:
//user----tables:users
{
Id:"user/001"
Name:"Jack Losen"
....
}
//schooling---table:schoolings
{
Id:"schooling/001"
Name:""
Major:"",
EnrollYear:1983
}
//user_schooling-----join table:user_schooling
{
user_id:"user/001"
schooling_id:"schooling/001"
}
如何以一组学校教育为条件通过连接表查询用户ID:user_schooling?
例如:如果我想获取B年在A学校,或者(不是并且)在D年在C学校......(或更多)的用户的所有ID,那么我的查询条件可能是这样的:
condition: [
{
Name:"A"
....
EnrollYear:B
},
{
Name:"C"
...
EnrollYear:D
}
]