避免获取删除的NSManagedObjects [英] Avoid fetching deleted NSManagedObjects

查看:128
本文介绍了避免获取删除的NSManagedObjects的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 NSFetchRequest ,可以避免获取 NSManagedObject

我知道可以检查 -isDeleted -managedObjectContext 返回nil,但是在数据库层有这样做吗?

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?

推荐答案

从技术上讲,如果对象被真正删除,它不会显示在数据库层。问题的症状是什么?

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?

这篇关于避免获取删除的NSManagedObjects的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆