I'm getting a weird issue when I fetch data using a predicate in CoreData. For some reason, the predicate is not filtering recent changes on the database.
I already tried to call save() before the fetch but the issue keeps happening.
My predicate is:
(lldb) po fetchRequest.predicate! update_device == "AAA"
and I'm getting this results:
(lldb) po (self.moc.fetch(fetchRequest) as! [Item]).map({$0.update_device!})
▿ 3 elements - 0 : "AAA" - 1 : "AAA" - 2 : "BBB"
So not make sense the last one:
- 2 : "BBB"
if I call self.moc.refreshAllObjects() the last item goes to original data that is "AAA".
If I check isUpdated on the item it returns false
Thank you.