• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Core Data Beginner Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Core Data Beginner Question
      • From: Mike Burns <email@hidden>
References: 
 >Core Data Beginner Question (From: Mike Burns <email@hidden>)

  • Prev by Date: Re: Sorting filenames the way the Finder does?
  • Next by Date: Re: "Recursive" #imports
  • Previous by thread: Core Data Beginner Question
  • Next by thread: Re: Core Data Beginner Question
  • Index(es):
    • Date
    • Thread