drewmccormack / ensembles

A synchronization framework for Core Data.
MIT License
1.63k stars 131 forks source link

CDEEventIntegrator treats (and deletes) managed objects from a sub-entity as unreferenced #118

Closed ddeville closed 10 years ago

ddeville commented 10 years ago

When doing a full integration, the CDEEventIntegrator will incorrectly treat managed objects from a sub-entity as unreferenced and delete them (in deleteUnreferencedObjectsInObjectIDsByEntity:).

This will lead to these managed objects to never be inserted into the local persistent store. I have only tested this with a simple data model where I have an abstract parent entity and two concrete sub-entities but I suppose it is broken for any data model containing sub-entities. Any managed object from these two sub-entities would never be merged into the local persistent store and I’ve traced the issue back to deleteUnreferencedObjectsInObjectIDsByEntity:.

Pull-request will follow up.

ddeville commented 10 years ago

The pull-request created new issue #119.