Re: Best Strategy for Cacheing
Re: Best Strategy for Cacheing
- Subject: Re: Best Strategy for Cacheing
- From: Oliver Scheel <email@hidden>
- Date: Mon, 3 Nov 2008 09:40:25 +0100
What is your motivation to use multiple ECs in this case?
Because I was running into problems where the saveChanges() was
generating errors stating that required toOne and toMany
relationships were null and others were pointing to objects that
weren't in the DB any longer. I couldn't figure out what process was
causing them so I figured moving away from the defaultEditingContext
would at least help narrow things down. Turns out some of the delete
rules on my Model had changed to "Do Nothing" or "Nullify" instead
of "Cascade" so objects were hanging around that should have been
deleted, and some of them pointing to other objects that had been
deleted.
One of the most important things is to get the model right.
Escpecially with complex objects graphs it is not so easy.
and must the object graph be created in one process?
I'm not sure what you mean by one process.
What I mean is, if the the graph be loaded must in one step or could
that happen incremental?
What I did in my projects (multiple hierarchies with each ~50.000
nodes, > 5 levels) is to set up a lightweight (non EOF) object graph/
hierarchy which gathers the nodes with one raw fetch. If an object is
needed as an EO, it will be fetched separately. I think this could
also be done by matarialzing the object from the raw result, if that
matches the EO.
Since MSQL doesn't support hierarchical queries like Oracle, you need
to order the raw fetch by level number and use a hash (NSDictionary)
to track the references for the parent ids.
Oliver
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden