我有解析查询
let query = PFQuery(className:"Organization")
query.findObjectsInBackgroundWithBlock {
(objects: [PFObject]?, error: NSError?) -> Void in
if error == nil {
// this Organization contains some users as relation
let users = object["users"] // this is PFRelation class
}
}
我想检查以上users
字段(PFRelation)是否包含或指向任何用户,如果它包含/指向任何内容,那么我可以执行_User
类的关系查询。那么如何检查users
是否包含/指向某事物?