Ok, I understand in theory what the problem is, I'm just not clear where in code this could be happening.  I'm not consciously manipulating connections and I guess Zope is taking care of those low-level connection details with the ZODB for me.
<br><br>Can I programmatically determine whether an object is already loaded/cached by a different connection?<br>Would it help to try isolate this routine to a single connection?<br>*Can* I isolate this routine to a single connection?
<br><br>You know, I'm starting to think that my fancy little recursion between objects is what's royally screwing things up.&nbsp; A lot of loading of objects occurs here, possibly touching on the same objects between calls...
<br><br>Any other pointers/hints are welcome!<br><br>Thank you Dieter and anyone else who can help out!<br><br>Garth<br><br><div><span class="gmail_quote">On 11/9/06, <b class="gmail_sendername">Dieter Maurer</b> &lt;<a href="mailto:dieter@handshake.de">
dieter@handshake.de</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Garth B. wrote at 2006-11-9 11:21 -0500:<br>&gt;I'm sporadically getting the following error thrown as a result of a routine
<br>&gt;I've written.<br>&gt;<br>&gt;InvalidObjectReference: Attempt to store a reference to an object from a<br>&gt;separate connection to the same database or multidatabase.<br><br>This is in indication that you have introduced a persistency bug:
<br><br>&nbsp;&nbsp;It is very essential that you use a persistent object only<br>&nbsp;&nbsp;in the context of the ZODB connection that loaded this object.<br><br>&nbsp;&nbsp;Failing to fulfill this requirement can lead to several kinds<br>&nbsp;&nbsp;of difficult to understand errors. The one, you see above
<br>&nbsp;&nbsp;is one such kind.<br><br>&nbsp;&nbsp;Apparently, you try to store a persistent object from a connection &quot;C1&quot;<br>&nbsp;&nbsp;as attribute of a persistent object from a different connection &quot;C2&quot;.<br><br><br>The bug is usually introduced by storing persistent objects outside
<br>of their connection cache -- e.g. on class level or in a module level<br>cache.<br><br><br><br>--<br>Dieter<br></blockquote></div><br>