• 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
Core Data and ordered relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data and ordered relationships


  • Subject: Core Data and ordered relationships
  • From: "Sean McBride" <email@hidden>
  • Date: Mon, 15 Sep 2008 17:55:40 -0400
  • Organization: Rogue Research

Hi all,

There have been discussions in the past about the fact that
relationships in Core Data are unordered (sets) instead of ordered
(arrays).  I have a vague question about this...

In my model: entity 'Department' has a to-many relationship to entity
'Employee' named 'employees'.  There are a maximum of 6 employees and
their order is important.  How to take that into account?  Should I:

 a) add relationships named employee1, ..., employee6, in the xcdatamodel?
 b) add an attribute named 'index' (value 1 to 6) and code methods named
employee1, etc. in my NSManagedObject subclass?

I want to be able to bind NSViews using 'employeeX' in the keypath.  For
example, I'd like to bind an NSTextfield's value to
departmentController.employee3.fullName.

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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

  • Follow-Ups:
    • Re: Core Data and ordered relationships
      • From: Jamie Hardt <email@hidden>
  • Prev by Date: Re: BOOL array
  • Next by Date: Re: BOOL array
  • Previous by thread: NSXMLParser
  • Next by thread: Re: Core Data and ordered relationships
  • Index(es):
    • Date
    • Thread