[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
copyObject: deep or shallow copy?
I wonder if someone can give me a quick answer to this question.
Does Database.copyObject() to a deep copy or a shallow copy?
By way of example:
Say I have a three-layer deep graph of database objects that I want to use as a
template. This objects are ititialized and maintained in a "blank" state. I
want to do a deep copy of this graph when creating a new instance of an object
which contains this graph, but I don't want to get references (and thereby
modify) the original "blank" template objects?
Does this make sense? Am I babbling? I don't know...
Also, I seem to recall someone saying that copyObject had some performance
advantages. Is this correct?
Thanks,
Nathan Probst