I am using includeKey to load multiple values from an array column in my PFObject. When I navigate to the tableView, however, the tableView only loads a single row
This is because the Parse cellForRowAtIndexPath method is only called once (when it should be called for the amount of values in the "following" array)
Here's my implementation
override func queryForTable() -> PFQuery {
let query = PFQuery(className: "Followers")
query.whereKey("username", equalTo: username)
query.includeKey("following")
return query
}
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath, object: PFObject?) -> PFTableViewCell? {
let cell = tableView.dequeueReusableCellWithIdentifier(identifier) as! AccountQueryCell
let followerObject = object as! PFFollowers
cell.usernameLabel.text = followerObject.getFollowing()[indexPath.row]
cell.profileImage.username = followerObject.getFollowing()[indexPath.row]
return cell
}
As you can see, I return a query that includes the "following" array.
My Parse "Followers" class contains the following custom columns: "following" (Array) and "username" (String)
Could someone explain to me why my query isn't calling cellForRowAtIndexPath for every value in the following array?