openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dianne Richards (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-885) Support clear methods on EntityManager, including new CascadeType.CLEAR
Date Mon, 16 Mar 2009 14:17:50 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dianne Richards updated OPENJPA-885:
------------------------------------

    Attachment: detachCodePatch.txt
                detachTestPatch.txt

I'm attaching both a code patch and test patch, which should be committed together. Documentation
updates will be included in a future patch.

This code provides support for the clear(Object) method in the JPA 2.0 spec draft. In order
to provide the correct semantics, some default behaviors of the detach methods was changed.
We no longer flush before detach, nor copy the detached object, nor automatically cascade.
(Cascade is based on the cascade annotation by default.) Also, to comply with the spec, the
object is now removed from the persistent context.

In order to revert to the previous detach behavior, the openjpa.Compatibility property may
be changed by setting the following attributes:
   flushBeforeDetach=true
   copyDetachedObjects=true (will also keep the object in the persistent context)
   cascadeWithDetach=true

> Support clear methods on EntityManager, including new CascadeType.CLEAR 
> ------------------------------------------------------------------------
>
>                 Key: OPENJPA-885
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-885
>             Project: OpenJPA
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>            Reporter: Dianne Richards
>            Assignee: Dianne Richards
>             Fix For: 2.0.0
>
>         Attachments: CompatibilityProblemPatch.txt, detachCodePatch.txt, detachTestPatch.txt,
patch.txt
>
>
> Support the 2.0 new  EntityManager clear() methods. Also support the new CascadeType.CLEAR.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message