When calling the addPersistentStoreWithType
method of a NSPersistentStoreCoordinator
object, what is happening exactly ?
By looking at the examples on the web, I see that calling this method will add the persistent store at the given URL to our persistent store coordinator, am I right ?
My main question is about what happens if :
- There was no persistent store yet at the given URL ? Is it than created for us automatically by calling this method ? Or do we have to do something else ?
- If there is already a store at the given URL, is it replaced or something ? What happens if the data model changes (for instance, if you add a new property to a managed class).
Thank you !