Thanks in advance for all your help community!! i had a early problem which was pointed out to me and i fixed "[Person object]-should be-->[Person alloc]init]i fixed that and now able to add a Person object now to my server. But here is the problem all the values on server are null and its throwing back a 1001 code Code=1001 "Could not find an object mapping for keyPath: " UserInfo=0x5938ce0 {=RKObjectMapperKeyPath, NSLocalizedDescription=Could not find an object mapping for keyPath: } what am i mapping wrong any ideas? Noobie here and be grateful for any help provided! Ohh yea am willing to pay for lessons on this matter if your in socal. Thnx again!
RKObjectMapping* userMapping = [RKObjectMapping mappingForClass:[Person class]];
[userMapping mapKeyPath:@"updated_at" toAttribute:@"updatedAt"];
[userMapping mapKeyPath:@"created_at" toAttribute:@"createdAt"];
[userMapping mapKeyPath:@"name" toAttribute:@"name"];
[userMapping mapKeyPath:@"id" toAttribute:@"personId"];
RKObjectMapping* dogMapping = [RKObjectMapping mappingForClass:[Dog class]];
[dogMapping mapKeyPath:@"created_at" toAttribute:@"createdAt"];
[dogMapping mapKeyPath:@"person_id" toAttribute:@"spersonId"];
[dogMapping mapKeyPath:@"name" toAttribute:@"name"];
[dogMapping mapKeyPath:@"updated_at" toAttribute:@"updatedAt"];
[dogMapping mapKeyPath:@"id" toAttribute:@"dogId"];
RKObjectMapping *dataMapping = [RKObjectMapping mappingForClass:[Data class]];
[dataMapping mapKeyPath:@"dog" toAttribute:@"dogs"];
[dataMapping mapKeyPath:@"person" toRelationship:@"person" withMapping:userMapping];
[[RKObjectManager sharedManager].mappingProvider addObjectMapping:dataMapping];
[[RKObjectManager sharedManager].mappingProvider setMapping:userMapping
forKeyPath:@"people"];
RKObjectRouter * router = [RKObjectManager sharedManager].router;
[router routeClass: [Person class] toResourcePath:@"/people/:personId"];
[router routeClass: [Person class] toResourcePath:@"/people"
forMethod:RKRequestMethodPOST];
RKObjectMapping *personSerializationMapping= [RKObjectMapping mappingForClass:
[NSMutableDictionary class]];
[personSerializationMapping mapAttributes:@"name", nil];
[[RKObjectManager sharedManager].mappingProvider
setSerializationMapping:personSerializationMapping forClass: [Person class]];
Person* daveLiu =[[[Person alloc]init]autorelease];
daveLiu.name = @"dave";
[[RKObjectManager sharedManager] postObject:daveLiu delegate:self];