Re: Core Data guidance Was: Calling processPendingChanges from awakeFromInsert
Re: Core Data guidance Was: Calling processPendingChanges from awakeFromInsert
- Subject: Re: Core Data guidance Was: Calling processPendingChanges from awakeFromInsert
- From: Jim Correia <email@hidden>
- Date: Fri, 21 Sep 2007 08:20:06 -0400
On Sep 20, 2007, at 10:26 PM, mmalc crawford wrote:
On Sep 20, 2007, at 5:56 PM, Brian Williams wrote:
Have the core data docs people though about a section specifically
explaining
what you should and shouldn't do when and where. Maybe in the
context of the
object and document life cycles. Including the gotchas like the
side effects of
undo redo etc... I really could have used some architecture
guidance with my
first CD projects.
As ever, if there are areas which you think need additional
explanation, please file a bug report.
And so that people don't go away thinking that filing bugs against
the documentation is a waste of effort, let me say that over the
years I've had generally good success with filing bugs against the
documentation and seeing it evolve in response to that feedback.
To be fair to the docs, the documentation does contain advice about
this issue, but it exists in the subclassing NSManagedObject notes.
It says -initWithEntity:insertIntoManagedObjectContext: must not
fetch or have side effects on the managed object context. -
awakeFromInsert isn't mentioned, but since this happens as a side
effect of insertion, it is not unreasonable to draw the conclusion
yourself that you are subject to the same constraints.
Jim
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden