db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew T. Adams" <matthew.ad...@xcalia.com>
Subject Re: RETRY: Transient instance referencing a detached instance? (was: Question about attachCopy, transient & detached instances)
Date Wed, 05 Oct 2005 18:59:00 GMT
"Wes Biggs" <wes@tralfamadore.com> wrote in message
news:<mailman.5533.1128524276.10966.jdo-general@jdo-experts.org>...
> 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.

This use case fell out very naturally for me while working on a website that
uses detached objects.  I ended up with a transient User object referencing
a detached Country object, and, of course, when I called
pm.makePersistent(user), I got an JDOUserException as I should have, per the
spec as it stands right now.

--matthew



Mime
View raw message