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