NEWBIE: Core Data Orientation questions
NEWBIE: Core Data Orientation questions
- Subject: NEWBIE: Core Data Orientation questions
- From: J Tichenor <email@hidden>
- Date: Wed, 22 Jun 2005 22:01:15 -0700
So I am just trying to get my head around how core data works. I have
tried to find archival answers to these questions and may have missed
previous mentions -- forgive me if this is repeated trodden territory.
I did the tutorial and love how simple and powerful an application
can whip up with little to no code. Wonderful.
But real life has it that few applications are as simple as the
tutorials, as much as we might like. So can someone confirm if I am
on the right track.
I have a bunch of entities, each with some number of properties. I
can use the data modeller to build the basic structure of each
entity, but if I want entities that have more out of the ordinary
behavior -- calculated sums, notification of events, etc -- then I
need to subclass the NSManagedObject to include this unique behavior.
I would then change the class in the Entity modeler to reflect this
subclass. From that point forward, I could add new properties either
in code or in the modeler, depending on how unique my subclass of
NSManagedObject is to that particular entity?
How often or unusual would it be for an application to have more than
one Managed Object Context? At what point would you feel that a
Managed Object Context would become unwieldy -- 100 entities? 1000?
And if one were to create more than one Context, what would be the
mechanism for communication between each Context? Can data storage
happen in the same persistent file with multiple Contexts?
If I want to programmatically dig into a Context, I assume that I
would find the Entity that interests me and then pull out the
property description relevant to query, either through fetching or
through classic ObjC programming?
I think, so far, those are the questions. Any thoughts would be most
appreciated!
James Tichenor
_______________________________________________
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