[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copyObject: deep or shallow copy?



On Thu, 05 Apr 2001, Lane S. Wimberley wrote:
> Falko Braeutigam writes:
> > On Thu, 05 Apr 2001, Nathan Eric Probst wrote:
> > > I wonder if someone can give me a quick answer to this question.
> > > 
> > > Does Database.copyObject() to a deep copy or a shallow copy?
> > deep. (excluding dependent database objects of course)
> 
> Copy and delete semantics depend on the nature of the relationship
> between two objects.  So, ideally, a (some would argue necessary)
> system feature would be support for definition of copy and delete
> semantics in the schema on a per-relationship basis.  Ie, when two
> objects are related (by an object-object reference), one could specify
> whether delete and copy operations should be propagated across the
> relationship.
Sounds cool and reasonable. However, I'm not sure if we should add things
like that to ozone. The goal of ozone was to add nothing than persistence and
transactions to the Java object model. Which is not true because there is also
access control. Every extension of the ozone object model leads to new APIs and
paradigms which are not represented in the Java object model and so are not
transparent to the developer. EJB does this already and it does it (more or
less) very well. I'm not sure if we should move in this direction.

> 
> (What is a "dependent database object?")

This is not an ozone term or something. These are objects that the current
object has a reference (proxy) to.


Falko
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com