I have a question about subtracting certain data and retrieving only one column. I have two class. "Flag" and "Post". When user flags the post, new data is being made in "Flag" class. "Flag" class has 3 columns: fromUser(pointer), toUser(pointer), postID(objectID of a post).
My app basically plays media and I want to take out flagged contents. Let's say there are 5 media to be shown and 2 of them are flagged. Then, I just want to show rest of them, 3.
Below are my codes:
var queryForPost = PFQuery(className: "Post")
var queryForFlaggedPost = PFQuery(className: "Flag")
queryForPost.whereKey("forEvent", equalTo: self.event!)
queryForFlaggedPost.whereKey("fromUser", equalTo: PFUser.currentUser()!)
queryForPost.whereKey("objectID", doesNotMatchQuery: queryForFlaggedPost)
queryForPost.findObjectsInBackground()
After running this code, the console result I get is
2015-09-16 19:56:28.654 *[59699:4007580] [Error]: bad type for $notInQuery (Code: 102, Version: 1.7.5)
we just fetched nil videos
Optional(Error Domain=Parse Code=102 "bad type for $notInQuery" UserInfo=0x7ffb5509bb10 {code=102, originalError=Error Domain=NSURLErrorDomain Code=-1011 "The operation couldn’t be completed. (NSURLErrorDomain error -1011.)", temporary=0, error=bad type for $notInQuery, NSLocalizedDescription=bad type for $notInQuery})
2015-09-16 19:56:28.708 *[59699:4007695] [Error]: object not found for update (Code: 101, Version: 1.7.5)
Can you guys tell me what I am doing wrong?