Fix issue with incorrect quoting within the mapping cache causing duplicated objects. closes #598. refs #578

This commit is contained in:
Blake Watters
2012-03-20 21:11:29 -04:00
parent 175a90cabe
commit 368f5bf11a
4 changed files with 68 additions and 6 deletions

View File

@@ -164,7 +164,7 @@
NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
[fetchRequest setEntity:entity];
[fetchRequest setFetchLimit:1];
[fetchRequest setPredicate:[NSPredicate predicateWithFormat:@"%@ = %@", mapping.primaryKeyAttribute, lookupValue]];
[fetchRequest setPredicate:[NSPredicate predicateWithFormat:@"%K = %@", mapping.primaryKeyAttribute, lookupValue]];
[fetchRequest setResultType:NSManagedObjectIDResultType];
NSArray *objectIds = [NSManagedObject executeFetchRequest:fetchRequest inContext:managedObjectContext];