I am working on app in which i have to create backup of particular almirah of books & have to restore later.
There are multiple almirahs & each almirah have multiple books & each book have multiple chapters & so on. In core data i am using a single persistence store to save my data. entities have to-one, to-many & many to many kind of relationships.
One requirement in the app is to sync almirahs with server. User can update almirah, book & questions etc.
What i want is before syncing data to server i want to take backup of a particular almirah which i need to sync with server including all relationship etc. SO that i can restore that almirah later if required.
Restore is required because multiple users can sync same almirah & because of that after sync the data wouldn't be same as it was before sync.
I read this SO link but not get through much. Any help would be appreciated. How can I duplicate, or copy a Core Data Managed Object?
Shall i use multiple persistence stores?