Copying objects from one GOODS server to another

Avi Bryant avi.bryant at gmail.com
Sun Dec 12 11:30:23 UTC 2004


On Sun, 12 Dec 2004 16:17:13 +0800, Yar Hwee Boon <hboon at motionobj.com> wrote:
> I'm trying to copy objects from one GOODS server to another. A Dolphin
> program writes to the source DB and I'm trying to copy from the source to
> the destination DB using Squeak. I'm hitting cases where I *think*
> KKObjectProxy objects are not resolved before copying over. Thus, the
> destination DB holds an object-id that is only valid in the source DB. e.g
> this happens to object b when I copy object a which holds object b.

It should be pretty easy to find out if this is actually happening -
just use the goods command line browser tool to look directly at the
objects in the DB, which will either include KKObjectProxy or they
won't.

> Is
> there a way to "resolve" an entire object and all its ivars or is there a
> simpler way? Thanks.

I would be inclined to do this as a copy operation - I don't like the
idea of multiple database connections having the same instances in
their cache.  It might work do just do this:

KKObjectProxy>>veryDeepCopyWith: aCopier
   ^ self xxxObject veryDeepCopyWith: aCopier

and then use #veryDeepCopy on the root (or whatever it is you want to
copy over) and commit the result.

Avi



More information about the Squeak-dev mailing list