ios '+entityForName: nil is not a legal NSPersistentStoreCoordinator for searching for entity name '

我这引发这个问题是因为我创建完context后没有和store进行绑定,导致当前的context中的store是nil,然后由context中的store再去搜索实体当然就异常啦。 添加     _context.persistentStoreCoordinator = store; 就ok了
相关文章
相关标签/搜索