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