Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 15271 invoked from network); 25 May 2008 02:42:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 May 2008 02:42:21 -0000 Received: (qmail 49301 invoked by uid 500); 25 May 2008 02:42:23 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 49282 invoked by uid 500); 25 May 2008 02:42:23 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 49126 invoked by uid 99); 25 May 2008 02:42:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 May 2008 19:42:22 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 May 2008 02:41:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2F167234C122 for ; Sat, 24 May 2008 19:41:58 -0700 (PDT) Message-ID: <1384158775.1211683318191.JavaMail.jira@brutus> Date: Sat, 24 May 2008 19:41:58 -0700 (PDT) From: "Patrick Linskey (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-591) Entities are flushed before being detached or serialized In-Reply-To: <1986366187.1210020115737.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrick Linskey updated OPENJPA-591: ------------------------------------ Fix Version/s: (was: 1.1.0) 1.1.1 > Entities are flushed before being detached or serialized > -------------------------------------------------------- > > Key: OPENJPA-591 > URL: https://issues.apache.org/jira/browse/OPENJPA-591 > Project: OpenJPA > Issue Type: Sub-task > Components: kernel > Affects Versions: 1.0.0, 1.0.1, 1.0.2 > Reporter: Michael Dick > Assignee: Michael Dick > Fix For: 1.0.3, 1.1.1, 1.2.0 > > > Entities are flushed if the entity is serialized or if the detach and detachAll methods are invoked. > Similar to OPENJPA-119 I believe this is a remnant of the JDO persistence layer. Whether this is desirable in JPA or not, we need to be consistent whether the entity is detached via clear, or the detach methods. > To resolve the problem I propose adding a new Compatibility option : flushBeforeDetach. If this is set to true we'll keep the current JDO-like behavior. If false then we'll just detach. I believe the same setting could apply when entities are serialized although it might be clearer to have a separate option for serialization. > In the 1.0.x branch the flushBeforeDetach setting will only take effect for the detach, detachAll and serialization path. It will not affect the EntityManager.clear() method - in order to maintain backwards compatibility. > In 1.2.x + the clear method will also defer to the flushBeforeDetach setting. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.