[
https://issues.apache.org/jira/browse/JDO-522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527527
]
Matthew T. Adams commented on JDO-522:
--------------------------------------
Chris, very good start.
Minor issue: I don't think that the parenthetic statement "multiple calls to
makePersistent with the same pc against the same pm will result in a
JDOUserException" is correct. With CopyOnAttach set to false, if I pass a
detached-dirty instance to a new pm's makePersistent method, I will get the
same instance back, only it's in the persistent-dirty state. An immediate
subsequent call to the same pm's makePersistent call will not throw, as the
instance is no longer detached-dirty, it's persistent-dirty. The
JDOUserException is thrown only when the pm already has an object in the cache
with the same identity as the detached instance. Thus, multiple calls to
makePersistent with the same pc against the same pm will not throw a
JDOUserException; the only case in which makePersistent will throw is when an
instance is already in the pm's cache with the same identity as a detached
instance passed to one of that pm's makePersistent/makePersistentAll methods.
> Draft proposal for CopyOnAttach property
> ----------------------------------------
>
> Key: JDO-522
> URL: https://issues.apache.org/jira/browse/JDO-522
> Project: JDO
> Issue Type: Task
> Components: api2
> Affects Versions: JDO 2 maintenance release 1
> Environment: n/a
> Reporter: Chris Beams
> Assignee: Chris Beams
> Fix For: JDO 2 maintenance release 1
>
> Attachments: proposal-CopyOnAttach.rtf
>
>
> Minutes: JDO TCK Conference Call Friday, Aug 10, 9 am PDT
> On 8/10/07, Craig L Russell <[EMAIL PROTECTED]> wrote:
> Attendees: Chris Beams, Matthew Adams, Michelle Caisse, Craig Russell
> Agenda:
> 3. Attach (makePersistent) a detached instance always merges changes
> into the cache. Can this behavior be changed to make the parameter
> instance change its state, throwing an exception if there already is
> an instance in the cache, based on a user-specified property? Seems
> like this would be a good addition to the spec. AI Chris prepare a
> proposal for the jdo expert group alias.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.