note
samtregar
<blockquote><i>What do you mean when you say that you 'apply a local fix' - how is what you describe a 'fix' for anything? (You still end up with the cycles in the database, which I gather you want to do)</i></blockquote>
<p>
I mean I fix the code so it doesn't die() or loop forever anymore. A typical break is either an error about not being about the find the object linked to, or worse, an infinite loop loading the same nodes over and over.
<p>
The cycles are perfectly valid, so I'm not trying to weed them out.
<p>
<blockquote><i>
Why would you be creating the id for A 'early' when you would normally generate the ids in order?</i></blockquote>
<p>
Here's the "normal" course of events in my system:
<p>
<ul>
<li>Create an object, unsaved without an ID.</li>
<li>Fill it with data. Some of the data may include the IDs of linked objects.</li>
<li>Save the object, creating an ID for it.</li>
</ul>
<p>
That works great until the code finds a cycle. When I run into a cycle I fix it to:
<p>
<ul>
<li>Create an object, unsaved without an ID.</li>
<li>Fill it with data, but not the data that might cycle.</li>
<li>Save the partially filled object, creating an ID for it.</li>
<li>Fill in the possibly cyclic pieces.</li>
<li>Save the completed object.</li>
</ul>
<p>
The problem is that doing this for each node type when I find a break is a real pain.
<p>
-sam
457924
457933