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

Re: CoreData implementation of persons with any number of assets


  • Subject: Re: CoreData implementation of persons with any number of assets
  • From: "I. Savant" <email@hidden>
  • Date: Thu, 26 Jul 2007 17:55:28 -0400

On Jul 26, 2007, at 5:30 PM, Andres wrote:
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?


A classic problem with a mostly simple answer: This is like a "line item" in an order. A line item belongs to an order (in your case, a person), and has a SKU/Product/Whatever (in your case, an asset), and has a "quantity" attribute. You need this to map between person and asset.

  Person:	has many LineItem
  LineItem: 	has one Person, has one Asset, (has "quantity" attribute)
  Asset:	has many Asset

--
I.S.



_______________________________________________

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>
References: 
 >CoreData implementation of persons with any number of assets (From: Andres <email@hidden>)

  • Prev by Date: NSTimers and sleeping mac's
  • Next by Date: Re: CoreData implementation of persons with any number of assets
  • Previous by thread: CoreData implementation of persons with any number of assets
  • Next by thread: Re: CoreData implementation of persons with any number of assets
  • Index(es):
    • Date
    • Thread