Я пытаюсь запросить всех существующих пользователей в моем приложении, которых пользователь не добавил в качестве «Друга». я получаю сообщение об ошибке
Не удается выполнить сравнительный запрос для типа: PFRelation
Вот мой текущий код:
override func queryForTable() -> PFQuery {
let currentFriends : PFRelation = PFUser.currentUser()!.relationForKey("friends")
// Start the query object
let query = PFQuery(className: "_User")
query.whereKey("username", notEqualTo: currentFriends)
// Add a where clause if there is a search criteria
if UserInput.text != "" {
query.whereKey("username", containsString: UserInput.text)
}
// Order the results
query.orderByAscending("username")
// Return the qwuery object
return query
}
Как решить эту проблему? Спасибо