parse.com wherekey doesnotmatchkey在查询中不过滤对象

时间:2016-01-05 10:39:18

标签: ios swift parse-platform

  

我有Parse班医生 - >姓名,诊所,地址......患者 - >   姓名,电话......约会 - >医生,患者,日期

我正在尝试运行子查询以返回没有特定日期预订的医生的记录

    let queryDoctor = PFQuery(className: Doctor.parseClassName())
    let queryAppointment = PFQuery(className:Bookings.parseClassName())
    queryDoctor.whereKey("objectId", doesNotMatchKey:"Doctor.objectId", inQuery: queryAppointment)
    queryDoctor.findObjectsInBackgroundWithBlock 
    {
        (results: [PFObject]?, error: NSError?) -> Void in
        print(results)
    }

但查询似乎返回了医生的所有记录而未考虑wherekey PFQuery方法。 任何建议?

1 个答案:

答案 0 :(得分:-1)

使用:

queryDoctor.getObjectInBackgroundWithId(etc...

希望这会有所帮助