• 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
Aggregations in a DAG with a Recursive Core Data Structure
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Aggregations in a DAG with a Recursive Core Data Structure


  • Subject: Aggregations in a DAG with a Recursive Core Data Structure
  • From: Mike Rossetti <email@hidden>
  • Date: Wed, 11 Jul 2007 09:19:03 -0600

I'm sure this has been asked and answered before but a search of cocoa-dev using a wide variety of terms failed to come up with anything useful.

Imagine a basic parts list model with two entities:

	item
		name
		parts (1::n to part)
		totalCost

	part
		name
		subparts (1::n to part)
		cost

I'd like totalCost to be calculated from the sum of the item's parts costs. And I'd like each part's cost to be calculated as the sum of it's subparts' costs. The parts hierarchy can be arbitrarily deep. Cycles are not allowed.

Is there an example that shows how to implement the totalCost and cost fields? Preferably using Core Data.

Thanks,
Mike

_______________________________________________

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: Aggregations in a DAG with a Recursive Core Data Structure
      • From: "Marcus S. Zarra" <email@hidden>
  • Prev by Date: Re: Core Data and Document Packages
  • Next by Date: Tracking the amount of inbound/outbound network traffic
  • Previous by thread: successive transformations
  • Next by thread: Re: Aggregations in a DAG with a Recursive Core Data Structure
  • Index(es):
    • Date
    • Thread