On Thu, 23 Mar 2000, Andrew M. Kuchling wrote:
I only see one way of doing this, by walking over the whole object graph starting from the ZODB's root objects. Storage objects do this in their pack() method to determine reachability. Problem: you'd have to copy the walking logic out of the pack() method into your own method.
Hmmm ... wouldn't that imply that you would need to change the stored instances in place? Lets suppose there is such a function. What should it happen when you do find such an 'unreachable' object. Modify it and append it to the end of Data.fs? As part of which transaction? (I suppose you can have one transaction that modifies all the objects of the given type) What happens if that unreachable instance has a newer version? Then if you modify both versions as part of different transactions (or even the same) you still loose the Undo facility. Generally I can't see an easy way of changing single instances that belong to a multi-instance transaction and keeping that transaction set as a group. Seems to me you would have the same problem even if you modify just the reachable objcets. If I am right then you will loose the Undo facility anyways so you might as well pack to 0 and modify all the reachable ones in one transaction. Pavlos