Re: Many to Many in Core Data
Re: Many to Many in Core Data
- Subject: Re: Many to Many in Core Data
- From: Bill Cheeseman <email@hidden>
- Date: Fri, 29 Jul 2005 17:24:16 -0400
on 2005-07-29 4:12 PM, Clayton Leitch at email@hidden wrote:
> Is a many to many relationship possible, since I do not see a way to
> designate a primary key.
Yes. I have just about finished a Core Data example that shows one way to
set up a many-to-many relationship with a reasonably convenient UI. I expect
to post it somewhere publicly within a week or two. When I do, I'll announce
it here.
It also shows how to make a Core Data application AppleScriptable.
To answer your question specifically, use the Xcode data modeler to create
two entities, say, Persons and Companies. Then make a to-many relationship
in each to the other. Then make the relationships the inverse of one
another. Voila! -- a many-to-many relationship.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden