Re: core data structure?
Re: core data structure?
- Subject: Re: core data structure?
- From: Amy Gibbs <email@hidden>
- Date: Thu, 9 Sep 2010 12:14:47 +0100
I've made the changes to my model, and the UI for this. I was just
wondering how I should achieve the following: (a similar relationship
in my app, productss and kits, I had to do the same, add a third
inbetween entity)
Previously I summed the price attribute of the item to give me a
total, now I have the extra entity and quantities how would I be best
doing this.
For example, I have products and kits (in reality), in the datamodel I
have products, kit, and kitItems. kitItems have a qty attribute, and
relationships to kits and products. For each kit, I want to calculate
the total price of the included items (items can also be partial
quantities).
Previously I just used the bindings to @sum.price for the
arrangedObjects
I didn't really want to save the values as attributes, as I'd like the
values to reflect changes to the product prices. I only need to
display these in a label onscreen.
Is this what transient attributes are for?
Thanks for your help,
Amy
On 6 Aug 2010, at 1:20PM, Amy Gibbs wrote:
Hi,
I was wondering if anyone could point me in the right direction?
I have 2 entities, product and order. At the moment they are linked
with a many to many relationship as an order will have many
products, and products may be in more than one order. My issue is
that when I link them I cannot link quantities. For example, I may
want to order 10 of a product in an order. I figure I need to split
out the relationships, so I need a third entity, for example
orderItem, which has relationships to both the product and order
entities, but also has a quantity attribute.
Am I right here?
_______________________________________________
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