For some background, I am learning from the following Stack Overflow question that I asked regarding creating the this code. I was playing around with different combinations of whereKeys and queries, and I found a solution that seems to be working. I'm not really sure if this is the correct or most efficient way to handle a constraint on a query based on a relation, and any help improving or optimizing the code would be appreciated.  let query: PFQuery let isNormalQuery = false response = objects as! [PFObject] var responseObjectIds = [String]() for x in response{     responseObjectIds.append(x.objectId!) }let query2 = PFQuery(className: query.parseClassName)query2.whereKey(objectId, notContainedIn: responseObjectIds)query = PFQuery(className: query.parseClassName)query.whereKey(objectId, doesNotMatchKey: objectId, inQuery: query2)// query2 is then used to fetch objects from the Parse server
Adding a constraint to a PFQuery on a PFRelation with objects that have already been gotten
swift;parse.com