• 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
CoreData implementation of persons with any number of assets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData implementation of persons with any number of assets


  • Subject: CoreData implementation of persons with any number of assets
  • From: Andres <email@hidden>
  • Date: Thu, 26 Jul 2007 17:30:08 -0400

Hello,

I'm trying to implement an application using CoreData where I have a person
entity and an asset entity. A person entity has a to-many relationship to
the asset entity and vice-versa. However, I want each person instance to
specify their own quantity of any of the assets. How should I keep track of
the quantity each person wants of each asset?


This is what I tried with some Good and some Bad behavior. I gave the asset entity a name and a quantity attribute. The user selects from the list of assets to assign to a person. The selected asset instances are added to the person's NSMutableSet of assets. The Good here is that if the user edits an asset name, every person who's selected that asset will know the new name. I want to keep this behavior. The Bad here is that the quantity attribute is also shared and this should be unique to each person for a given asset.


What's the right way to implement the behavior I've described using CoreData?


Andres _______________________________________________

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: CoreData implementation of persons with any number of assets
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: Absolute path to the Application
  • Next by Date: NSTimers and sleeping mac's
  • Previous by thread: Re: Absolute path to the Application
  • Next by thread: Re: CoreData implementation of persons with any number of assets
  • Index(es):
    • Date
    • Thread