Im developing a iphone app and for DB im using core data. While saving the core data works properly.
But once in a while, the saving fails. This cause duplicate records in my app. I have 2 tables
Parent table
Child table
When child table fails and user tries to save again, multiple parents records are created. My questions are:
- Why core data fails. Since its rare im not able to find why it fails. What could be the reason?
- Is there any way to roll back the data of parent table also if child table fails to save.
Thanks in advance :)