Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I'm using OData4ObjC to have my iPhone app retreive/edit OData.

I've been able to successfully retrieve data, but when I try to delete some data:

Entities *proxy = [[Entities alloc]initWithUri:@"http://localhost:8080/Resource/example.svc" credential:nil];

//Creates and accesses the person object for the specified row
Model_date* selectedDate = [items objectAtIndex:indexPath.row];
NSLog(@"Project number: %@", selectedDate.getdate_project);  
[proxy deleteObject:selectedDate];
[proxy saveChanges];

It throws this error at deleteObject:

Terminating app due to uncaught exception 'Exception', reason: 'Invalid Operation : The context is not currently tracking the entity.'

I know it's tracking the entity - my NSLog prints out the project project number.

DeleteObject is defined in ObjectContext.h (Framework/bin/odatalib/include), which I have added to my project path. I've tried to debug step by step but my ObjectContext.m is included is binary, so all I see is assembly.

enter image description here

Does anyone have any pointers/suggestions??

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.