ios - RestKit Fetch Request Block (Deletion of orphaned objects) -


I am using restkit as screeshot has been shown in my coreData entities are organized Core Data Tables

I have included the following to remove orphan objects, bringing the request block

[objectManager addFetchRequestBlock: ^ NSFetchRequest * (NSURL * URL) {RKPathMatcher * pathMatcher = [RKPathMatcher pathMatcherWithPattern: @ "/ API / lists /: phone_no"]; NSDictionary * argsDict = zero; BOOL Match = [Path Mater MatchPath: [URL's Relayspace] TokenExecuting Strings: No Parsed Ages: & amp; Argsdict]; NSString * phone_no; If (match) {phone_no = [argsDict objectForKey: @ "phone_no"]; NSFetchRequest * fetchRequest = [NSFetchRequest fetchRequestWithEntityName: @ "list"]; // We do not need to request here. We remove all those local items, which do not respond in the present times. Bring back request; } Return zero; }];

It works fine for orphan lists and work items. For example, one task of some list is destroyed on the server, then on the refresh it also local shop and hence the table-view form disappears.

But the task of 'Task Log', 'Task Annotations' and 'Task Notes' as the children of Tasks do not get local stores if their server counterparts are removed

For example, if the task of doing the work comment refreshes the data 'Now' the orphaned work comment still shows in the table but then it is removed from the sever.

The return which I am using this descriptor is receiving all the relevant data in the appropriate JSON format

  // Get the answer counter for the list RKRPSPassDiscriptors * ListViewConversion = GET [ Zero state codes: RKestattus codeindexSatforClass (RKstatusCodeClassFailed)];  

Am I doing wrong? I use the controller of all those places that automatically update the scenes.

I can provide more information if needed

< Div class = "text" itemprop = "text">

You are not doing anything wrong in this way, but your expectations are wrong.

If the tasks are removed, the lists are removed, which is due to the core data extinction rule, which is not due to the restkit. RestKit will only get list to remove items in the store.

You can configure the rules for deletion in the core data, but your proprietary relationship can cause a waterfall to be removed from the last points, but again, this is not a direct part of the reactkit.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -