Making a copy of an object that is persisted by Cayenne

From: Eric Lazarus (ericllazaru..ahoo.com)
Date: Wed May 31 2006 - 13:03:36 EDT


What are the best ways to copy an object that is
persisted by Cayenne? I'm an old-time smalltalk
programmer and like to write a copy and a postCopy
method where a shallowCopy method is called before
the postCopy method is called and shallowCopy just
calls clone.

Are there any tricks to do take into account when
doing a copy of a subclass of a cayenne DataObject?

Does the clone method perform a shallowCopy and give
me back something that will persist correctly? Do I
need to do something so that the clone will be known
to cayenne? Perhaps clone is not supported at all in
cayenne?

I see a mention of SnapShot but I dont know what that
is. I also see cloneViaSerialization but perhaps that
is just for use with internal data structures and not
my domain objects?

Thanks,

Eric

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



This archive was generated by hypermail 2.0.0 : Wed May 31 2006 - 13:04:05 EDT