You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have below code to build a query out of two queries.
Issue is result is not sorted by updatedAt.
What could be the issue?
let ownerQuery = PFQuery(className: "requests")
ownerQuery.whereKey("owner", equalTo: forUser)
ownerQuery.whereKey("stage", equalTo: "initiated")
let requestQuery = PFQuery(className: "requests")
requestQuery.whereKey("requested_by", equalTo: requestedBy)
requestQuery.whereKey("stage", equalTo: "accepted")
// fetch all request of current user as requestor or lender/seller
let query = PFQuery.orQuery(withSubqueries: [ownerQuery, requestQuery])
query.includeKey("requested_by")
query.includeKey("owner")
query.order(byDescending: "updatedAt")
Didn't get any answer in stack Overflow so posting here.
Thanks
Ashish
The text was updated successfully, but these errors were encountered:
I have below code to build a query out of two queries.
Issue is result is not sorted by updatedAt.
What could be the issue?
Didn't get any answer in stack Overflow so posting here.
Thanks
Ashish
The text was updated successfully, but these errors were encountered: