• 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
Best method to observe an entity?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best method to observe an entity?


  • Subject: Best method to observe an entity?
  • From: Mitch Tishmack <email@hidden>
  • Date: Sun, 10 Jul 2005 20:53:41 -0500

Hi everyone,

I have a simple question regarding core data. I have 3 related entities. One is a simple list of items. The other is a simple tuple list of those related items. And the third is a list of the items as a pair with source and target.

The tuple has a many<->many relationship to the items, and the pairs are just a many pairs<->to one item. The caveat is that I am keeping a source/target of each item.

If I were to implement this in a database, normally I would just make a trigger on the tuple entity and build what I want into the third table. But I noted in the core data docs that kvo observing is disabled under core data.

Which leaves me 3 methods of adding the data I want into the pair entity.
1. Use a controller to add data to the tuple entity and then add any needed entries into the pair entity.
2. Implement my own accessor methods so I can get kvo notifications on the tuple list.
3. Ask anyone here if there is a way to get kvo observing on an entity so I don't need the controller.


Personally I like the controller method, but I thought I would ask everyone here how they might go about implementing this. This is my first real core data app and I haven't found much information on the preferred method to manage 2 related entities that depend upon updates to the other. Curious what everyone else would do.

Cheers,
Mitch
_______________________________________________
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


  • Follow-Ups:
    • Re: Best method to observe an entity?
      • From: Charilaos Skiadas <email@hidden>
  • Prev by Date: Re: Why does this leak memory?
  • Next by Date: Re: NSColorPanel Magnification tool
  • Previous by thread: Re: Custom NSSlider Action Not Firing
  • Next by thread: Re: Best method to observe an entity?
  • Index(es):
    • Date
    • Thread