從文檔:-existingObjectWithID:錯誤:這是文檔中的錯誤嗎? -existingObjectWithID:錯誤:或-objectWithID:似乎要求不同的東西不符合
If there is a managed object with the given ID already registered in the context, that object is returned directly; otherwise the corresponding object is faulted into the context.
This method might perform I/O if the data is uncached.
Unlike objectWithID:, this method never returns a fault.
那麼,這是悖論!
他們說,-existingObjectWithID:錯誤:可能會返回一個錯誤(「故障進入上下文」)。與此同時,他們說-objectWithID:確實會返回一個錯誤,但是-existingObjectWithID:error:不會。那麼現在呢?這兩種方法描述都討論了返回故障對象。
有人可以清除嗎?
無需兩次發佈此問題。 http://stackoverflow.com/questions/3006394/ – Emil 2010-06-09 14:13:26
@Emil - 這不是重複的。它提出了一個相關但不同的問題。 – TechZen 2010-06-09 21:04:43
@Tech同時發佈? – Emil 2010-06-09 21:16:52