CORE DATA: derived values from several entities and managed object instances ??
CORE DATA: derived values from several entities and managed object instances ??
- Subject: CORE DATA: derived values from several entities and managed object instances ??
- From: dan pahlajani <email@hidden>
- Date: Wed, 18 Jan 2006 13:56:23 -0800
Hello All,
It is me again with a Core Data app related question.
Several of the managed objects in my app have derived values (values
calculated from other attributes) just like a fullName being driven from
first and last names.
However, many a times the derived value is calculated using the attributes
of several entities AND many a times the derived values is calculated using
same attribute of an entity but from a set of managed object instances of
the entity.
What would be the best approach to do so. After giving a lot of thought to
this problem I am unable to come up with an elegant solution. So far, I am
using window controller to access the array controller and hence arranged
objects. I find it easier to work with orderd lists (arrays) since I can
access a specific managed object at a specific index.
It seems like managed objects using core data to-many relationships use
"sets" and not "arrays". I need access to ordered lists. Also when derived
value is calculated based on values from different entities, the calculation
should be done by an object that manages all the managed objects, like
managed object context. Which eans I have to find out how to subclass a
managed object context so that I don't have to write a lot of custom code
like createing presistent store and persistent store cordiators, etc.
There must be a better way to create derived values that based on objects
that spun across mutliple objects and entities.
All the help I can get will be greatly appreciated.
Thanks,
Dan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden