• 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: traversing to-many relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data: traversing to-many relationships


  • Subject: Core Data: traversing to-many relationships
  • From: email@hidden
  • Date: Tue, 10 Oct 2006 18:14:07 +0200

Hi,

I have a question regarding to-many relationships in Core Data:

Some background:
For my software tracking application, I have three entities: Product, Version and License. A product has a to-many relationship to Version and a Version has a to-many relationship to License. Both relationships have an inverse to-one relationship (every license belongs to exactly one version and every version belongs to exactly one product).


Product <---->> Version <---->> License

I have two table views: one showing the Products and another one that should show all Licenses for the selected product in the other table view. The array controller for the licenses is bound to the selection in the products array controller. The Model Key Path for the contentSet binding of the license array controller is set to versions.licenses and the Controller Key to selection.

I'd expect core data to take the selected product, gather all its versions and then gather all licenses for all those versions, but this does not happen. Instead, I'm getting the following error: Exception raised during posting of notification. Ignored. exception: [<_NSFaultingMutableSet 0x16660810> addObserver:forKeyPath:options:context:] is not supported. Key path: licenses. I have checked this and the licenses relationship is defined in the Version table.

When I'm having the secondary table view display the versions belonging to the products in the first table view (the classic example), everything works as expected in a master/detail interface. So while traversing one to-many relationship works fine, it seems like I'm missing something to have Core Data traverse two to-many relationships at once.

While I have some ideas for workarounds, I'm still wondering why this approach does not work.
Thanks in advance!


Peter
_______________________________________________
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


  • Prev by Date: Re: Code injection and replace methods at runtime
  • Next by Date: Re: Temporary files
  • Previous by thread: Re: NSCalendarDate saving and loading to get the same date-time (Floating Timezone)
  • Next by thread: Simple dialog sheet won't work with return key
  • Index(es):
    • Date
    • Thread