NSPredicate in NSFetchedResultsController doesn't use Category's getter

為{幸葍}努か 提交于 2019-12-01 20:56:54

The predicate is converted into SQL and run on the store. It doesn't run any of your code. As such you can only use the stored value in the data store. No transient attributes, no methods.

If you want to use the attribute in a fetch then you should save the value. This could be done by implementing willSave and having it set the value just before any other value changes are saved.

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