相关疑难解决方法(0)

Core-Data将保存:方法

我有一个属性modificationDate,我Entity A.想在NSManagedObject保存时设置它的值.但是,如果我尝试在NSManagedObject willSave:方法中这样做,我会收到一个错误:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to process pending changes before save.  The context is still dirty after 100 attempts.  Typically this recursive dirtying is caused by a bad validation method, -willSave, or notification handler.' ***
Run Code Online (Sandbox Code Playgroud)

所以,我想知道,设定价值的最佳方法是modificationDate什么?

core-data objective-c nsmanagedobject

21
推荐指数
4
解决办法
1万
查看次数

标签 统计

core-data ×1

nsmanagedobject ×1

objective-c ×1