Closed paulocoutinhox closed 9 years ago
The only way I see is to fix implementation...
Have any apple dictionary or mutable array that i can use without auto sort?
The easiest way I see is to create a kinda model/tuple to store these values, e.g.:
enum SortOrder { SortOrderASC, SortOrderDESC };
@interface ARSort : NSObject
@property NSString *name;
@property SortOrder order;
@end
and put the instances into NSArray/NSMutableArray
.
I solve the problem. Will make a PR.
Can you check? Here is working perfect.
The "order by" has incorrect order. Example:
When iActiveRecord create the "order by" query, it creates:
But the problem is not with iActiveRecord, the problem is with NSMutableDictionary. The method "orderBy" use a NSMutableDictionary to store the "orderBy" sentences. But NSMutableDictionary automatically order the items alphabetically.
Have any way to solve it?