Permalink
Browse files

Fixed Issue #294 - MR_requestAllSortedBy:ascending:inContext: did not…

… use correct context
  • Loading branch information...
1 parent f7c4350 commit 3656e74d632704c81d12fa0a6548bfe3371db99c @blackgold9 blackgold9 committed Nov 1, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalRequests.m
View
6 MagicalRecord/Categories/NSManagedObject/NSManagedObject+MagicalRequests.m
@@ -92,10 +92,10 @@ + (NSFetchRequest *) MR_requestFirstByAttribute:(NSString *)attribute withValue:
+ (NSFetchRequest *) MR_requestAllSortedBy:(NSString *)sortTerm ascending:(BOOL)ascending inContext:(NSManagedObjectContext *)context
{
- return [self MR_requestAllSortedBy:sortTerm
+ return [self MR_requestAllSortedBy:sortTerm
ascending:ascending
- withPredicate:nil
- inContext:[NSManagedObjectContext MR_contextForCurrentThread]];
+ withPredicate:nil
+ inContext:context];
}
+ (NSFetchRequest *) MR_requestAllSortedBy:(NSString *)sortTerm ascending:(BOOL)ascending

2 comments on commit 3656e74

@hodezx

But even if you fixed the inContext:[NSManagedObjectContext MR_contextForCurrentThread] to inContext: context, the sorting result could still be wrong if I keep changing the ascending...

@blackgold9
Magical Panda Software member

I don't understand what you mean. The ascending seems to be passed through correctly

Please sign in to comment.