如何检查Parse PFRelation对象是空的还是包含数据?

时间:2016-02-22 08:13:22

标签: ios swift parse-platform

我有解析查询

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是否包含/指向某事物?

0 个答案:

没有答案