Re: Core Data: Insert, Fetch, Re-Fetch. Same Object?
Re: Core Data: Insert, Fetch, Re-Fetch. Same Object?
- Subject: Re: Core Data: Insert, Fetch, Re-Fetch. Same Object?
- From: Jerry Krinock <email@hidden>
- Date: Thu, 11 Feb 2010 14:48:32 -0800
Thanks for your input, atze. I believe you. But to confirm it, we need the documentation.
On 2010 Feb 11, at 00:19, Alexander Spohr wrote:
> Every NSManagedObjectContext holds its own but unique copy of your object.
I understand that each managed object context makes separate copies, but I wouldn't say that it necessarily follows from this that any given managed object context could not create more than one.
> This is because the object in the sql-store needs a primary key.... I would have thought that your inserted object gets the persistent key set and will therefore be the same object as the fetched ones. But I did not check your code for a misconfiguration.
Well, it works as I said.
> No, you will always get the same object. Because this was why CoreData and EOF where made for. Exactly this.
That's what I'm looking for. If anyone can find "always get the same object" in the API documentation, please do so.
_______________________________________________
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