Re: Core Data Beginner Question
Re: Core Data Beginner Question
- Subject: Re: Core Data Beginner Question
- From: Brian Williams <email@hidden>
- Date: Thu, 14 Jun 2007 12:42:41 -0700 (PDT)
Mike,
>each project has an initial scene
You can set up the initial scene in the awakeFromInsert method in your project
class
> each scene has 4 directions - north/south/east/west - each
> direction possibly pointing to another scene object
Just make a relationship from Project to it's self for each direction.
Good luck
Brian
--- Mike Burns <email@hidden> wrote:
> I'm a little unclear on how to set up certain relationships in a Core
> Data data model for a NSPersistentDocument project I'm working on.
>
> There are three main objects (with a bunch of other ones that are
> omitted for simplicity) -
> project
> scene
> object
>
> Each project has a to-many relationship with both the scene and
> object objects:
>
> project <---->>scene
> project <---->>object
>
> In addition to those relationships however, the following occurs as
> well:
>
> each project has an initial scene
> each scene has 4 directions - north/south/east/west - each
> direction possibly pointing to another scene object
>
> In C++, my Scene object would have 4 pointer variables -
> northScene, southScene, westScene, eastScene - each one possibly
> pointing to another Scene object. What is the best way to represent
> that kind of a relationship in a Core Data data model?
>
> Thanks!
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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)
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