I have to create some data in CoreData entities in batch (import process) and I would like to "commit" at the end or "rollback" on an error (so saving inbetween won't work).
The problem is that I for example need to create an entity "Person" and later in that progress I need to re-use that entity. BUT it can already exists BEFORE this process or may be created WHILE this import process.
So I'm trying to fetch it with a predicate "(personId == 4711)". But although I have set
[fetchRequest setIncludesPendingChanges:YES];
it doesn't find the newly created Person object.
I read this this question and this answer which state, that it is not possible? Am I right?
If so, how can I workaround / handle this?