<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Adam wrote:
<blockquote cite="mid:1223134090.6102.11.camel@Jessa" type="cite">
  <pre wrap="">On Fri, 2008-10-03 at 14:24 -0600, Shane Hathaway wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Marius Gedminas wrote:
    </pre>
    <blockquote type="cite">
      <pre wrap="">  1. create modules in their old locations that import all the classes
     from the new locations (and do nothing else).
  2. write a script that opens the DB, iterates over all persistent
     objects in it, touches every single one of them (obj._p_activate()
     followed by obj._p_changed = True) and commits the transaction.
      </pre>
    </blockquote>
    <pre wrap="">Marius said it correctly, but I'd like to emphasize that it's not enough
to touch just the objects whose class changed, since persistent
references encode the module and class name.  It's best to just touch
everything.  You will have to use multiple transactions to touch
everything in a large database.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Thanks for that, guys, I've not used a mailing list like this before so
unsure how to respond. 

If ZODB stores the Package.Module.Class name in the pickle would it be
possible for me to simply rename them in the binary file?

My confusion here is that I've globally imported everything from the
packages into the current namespace of my main module. ZODB shouldn't be
aware I've moved the modules since for all intents and purposes to
Python, they are still there.
  </pre>
</blockquote>
<br>
It doesn't matter where you import it from or to - python uses the
location of the actual implementation and ZODB uses that. If you move
your implementation to another place you have to either update all
objects in the ZODB or add module aliases.<br>
<br>
Wichert.<br>
<br>
<pre class="moz-signature" cols="72">-- 
Wichert Akkerman <a class="moz-txt-link-rfc2396E" href="mailto:wichert@wiggy.net">&lt;wichert@wiggy.net&gt;</a>   It is simple to make things.
<a class="moz-txt-link-freetext" href="http://www.wiggy.net/">http://www.wiggy.net/</a>                  It is hard to make things simple.
</pre>
</body>
</html>