I tried to save meta data to a persistent store using MR_saveToPersistentStoreAndWait method. This does not work as the setMetadata: forPersistentStore: method doesn't update the change count. Therefore the NSManagedObjectContext method hasChanges will return NO and the save method returns. As a work around I saved the context chain manually. But I think it would be nice to have a parameter like enforceSave or similar so we can use MagicalRecord also for saving meta data.
I understand that this is not the purpose of the MagicalRecord API. However, since MagicalRecord manages the context stack, I would assume that a call to saveToPersistentStoreAndWait would ultimately save any changes. In case of changes to the meta data, this is not true. Changes are not recognized by the hasChanges method. I wonder whether this is a bug in Core Data. Now to save the meta data, I basically have to re-implement saveToPersistentStoreAndWait only without the hasChanges check. This means that I don't have knowledge about the context stack because it is managed by Magical Record, but I have to save the contexts all the way up to the root context. I guess I can live with that, but it feels a bit quirky.