Avoid fetching deleted NSManagedObjects

≡放荡痞女 提交于 2019-12-11 08:38:38

问题


Using NSFetchRequest, is it possible to avoid fetching a NSManagedObject that has been or will be deleted?

I know it's possible to check -isDeleted or if -managedObjectContext returns nil, but is there a way to do this in the database layer?


回答1:


Technically, if the object is truly deleted it will not show up at the database layer. What are the symptoms of the problem presenting as?



来源:https://stackoverflow.com/questions/9415071/avoid-fetching-deleted-nsmanagedobjects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!