Re: Questions about CoreData and object graphs
Re: Questions about CoreData and object graphs
- Subject: Re: Questions about CoreData and object graphs
- From: Bob Cromwell <email@hidden>
- Date: Thu, 15 Nov 2012 10:53:33 +0800
Actually your guess is wrong. Core Data could handle this by turn the object to fault. Have a look at the method refreshObject:mergeChanges.
Bob Cromwell
On 2012-11-15, at 上午10:30, William Squires wrote:
> 1) Can CoreData properly manage an object graph where the objects form a circular reference (i.e.)
>
> Entity Node
> int nodeType
> Node onTopOf // 1:1 relationship to another Node entity
> Node under // another 1:1 relationship
> End
>
> This would be a doubly-linked list in a circular queue so that you could go either direction from any Node entity. My guess is… no.
>
> 2) Without CoreData, if I simply declare in my model classes that they implement <NSCoding> (and I implement all the initWithCoder: and encodeWithCoder: methods), will this properly handle such a situation (i.e. a possibly circular object graph)?
>
>
>
> _______________________________________________
>
> 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
_______________________________________________
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