RestKit not mapping attributes properly when using CoreData <p>I am having some issues implementing RestKit/CoreData with my application. Using the RKTwitterCoreData example application and pointing it to my web service for the json feed, I get the resulting tableview:</p> <p><img src="https://i.stack.imgur.com/XSqw1.png" alt="Duplicate objects/ID not being displayed correctly"></p> <p>The issues encountered so far:</p> <ol> <li>Refresh generates a new core data entry even though i have primaryKeyAttribute set to the orderID.</li> <li>cell textLabel displays an odd orderID that doesn't match with my web service</li> </ol> <p>Here is my applicationDidFinishLaunchingWithOptions:</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Initialize RestKit RKObjectManager* objectManager = [RKObjectManager managerWithBaseURLString:@"http://mywebservice.com"]; // Enable automatic network activity indicator management objectManager.client.requestQueue.showsNetworkActivityIndicatorWhenBusy = YES; NSString *databaseName = @"RKTwitterData.sqlite"; objectManager.objectStore = [RKManagedObjectStore objectStoreWithStoreFilename:databaseName usingSeedDatabaseName:nil managedObjectModel:nil delegate:self]; RKManagedObjectMapping* statusMapping = [RKManagedObjectMapping mappingForClass:[Order class] inManagedObjectStore:objectManager.objectStore]; statusMapping.primaryKeyAttribute = @"orderID"; [statusMapping mapKeyPath:@"id" toAttribute:@"orderID"]; [statusMapping mapAttributes:@"created_at", nil]; // Register our mappings with the provider [objectManager.mappingProvider setObjectMapping:orderMapping forResourcePathPattern:@"/orders"]; // Create Window and View Controllers RKTwitterViewController* viewController = [[[RKTwitterViewController alloc] initWithNibName:nil bundle:nil] autorelease]; UINavigationController* controller = [[UINavigationController alloc] initWithRootViewController:viewController]; UIWindow* window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 480)]; [window addSubview:controller.view]; [window makeKeyAndVisible]; return YES; } </code></pre> <p>And the json result at /orders:</p> <p><img src="https://i.stack.imgur.com/rpp6I.png" alt="enter image description here"></p> <p>Any advice for dealing with this issue? Thanks!</p>