I Use parse-server version 2.2.25 and parse iOS SDK version 1.14.2
I would like sort all objects on my Cart
on field desc
of the object Catalog
.
My Simplified Database Structure is :
Catalog (Table)
+--------------+--------------+
|idkey (String)| desc (String)|
+--------------+--------------+
| 1 | a |
| 2 | b |
| 3 | c |
+--------------+--------------+
Cart (Table)
+--------------+------------------------------+
|Qty (Number) | Catalog (object -> PFObject) |
+--------------+------------------------------+
| 2 | 1 |
| 2 | 2 |
| 4 | 3 |
+--------------+------------------------------+
I try many solutions without good solution.
PFQuery *query = [PFQuery queryWithClassName:@"Cart"];
[query includeKey:@"Catalog"];
[query addAscendingOrder:@"desc"];
or
[query addAscendingOrder:@"Catalog.desc"];
So, I can't sort locally for 2 reasons :
Many records > 100.000
I use ParseUI (PFQueryTableViewController / PFQueryCollectionViewController), with pagination (25/40 record per page).
Any suggestions?