Create a Link Entity by adding another property linkType which decides the normal or alternate link.
In Item entity make to-many- relationShip for relationship link



Thanks
Kiran

On 13-Oct-09, at 11:34 AM, Rob Keniger wrote:

I'm just getting started with Core Data so go easy on me.

I am moving my existing app across to Core Data and I'm having trouble with a few concepts.

At present (pre-Core Data) my app has a model object ("Item") which is used as the node object in an NSTreeController.

This model object has multiple ivars of another custom object ("Link") like so:

@interface Item : NSObject
{
        Link* normalLink;
        Link* alternateLink;
}
@end

I'm trying to replicate this in my Core Data model. I have set up two entities, Item and Link. I have created two relationships in the Item entity, "normalLink" and "alternateLink", both pointing to the Link entity.

Basically, I want each of these relationships to point to an instance of the Link entity.

However, now I have a problem. My Link entity has one relationship ("item") which should be the inverse relationship, but that's not possible because I can only have one inverse relationship.

I think I'm getting mixed up here, how should this actually be modelled?

--
Rob Keniger



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/kirankumar.s%40prithvisolutions.com

This email sent to kirankuma...@prithvisolutions.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to