db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: RETRY: Transient instance referencing a detached instance?
Date Wed, 05 Oct 2005 19:09:16 GMT
> > Would it be cleaner to not allow transient instances to be included in
> > attachCopy() graphs at all?  Sounds that way to me.
>
> No, I'd like to continue to allow transient instances to be included in
> attachCopy graphs.  I'd like to **add** the ability for detached objects to
> be included in makePersistent graphs.

I'll second this requirement.
I asked for it on 16 Sep - see the posting in the EG archives titled 
"makePersistent with a detached object reachable".
We need a consistent interface for persistence, and having one method 
(makePersistent) doing things one way and another(attachCopy) doing it 
another doesn't help IMHO.

A user wants to persist a new object. They want to relate it to another object 
(in this case detached, but it could be any old object), and then do the 
persist. Having to work out which method to call in what circumstances, 
dependent on what objects you just happen to have in the graph is not 
user-friendly.


-- 
Andy

Mime
View raw message