Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MagicalRecord replacement for saveNestedContexts?

I ran into some issues with data not persisting with MagicalRecord and it turned out that using saveNestedContexts solved the problem. However according to the documentation, that method is being deprecated. What's the new practice for storing nested objects with MagicalRecord?

like image 425
Nick ONeill Avatar asked Sep 13 '26 18:09

Nick ONeill


1 Answers

Use one of these methods:

- (void) saveToPersistenStoreAndWait;
- (void) saveToPersistenStoreCompletion:^(BOOL success, NSError *error)completion;
- (void) saveOnlySelfAndWait;
- (void) saveOnlySelfCompletion:^(BOOL success, NSError *error)completion;

These methods are present in the MagicalRecord.h header file.

like image 181
casademora Avatar answered Sep 15 '26 08:09

casademora



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!