Re: CoreData implementation of persons with any number of assets
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