From dev-return-15369-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Wed Mar 03 18:10:57 2010 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 12471 invoked from network); 3 Mar 2010 18:10:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Mar 2010 18:10:57 -0000 Received: (qmail 49703 invoked by uid 500); 3 Mar 2010 18:10:49 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 49674 invoked by uid 500); 3 Mar 2010 18:10:49 -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 49666 invoked by uid 99); 3 Mar 2010 18:10:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Mar 2010 18:10:49 +0000 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; Wed, 03 Mar 2010 18:10:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2D5A5234C4BE for ; Wed, 3 Mar 2010 18:10:27 +0000 (UTC) Message-ID: <1366664180.40921267639827184.JavaMail.jira@brutus.apache.org> Date: Wed, 3 Mar 2010 18:10:27 +0000 (UTC) From: "Donald Woods (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Resolved: (OPENJPA-1155) BrokerImpl.detachAllInternal() does not detach newly loaded entities In-Reply-To: <213884880.1246549307204.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Donald Woods resolved OPENJPA-1155. ----------------------------------- Resolution: Fixed Fix Version/s: (was: 2.0.0) 2.0.0-M3 please open a new jira if additional work is required, as this is being marked as completed for the 2.0.0-M3 release > BrokerImpl.detachAllInternal() does not detach newly loaded entities > -------------------------------------------------------------------- > > Key: OPENJPA-1155 > URL: https://issues.apache.org/jira/browse/OPENJPA-1155 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 2.0.0 > Reporter: Dianne Richards > Assignee: Dianne Richards > Fix For: 2.0.0-M3 > > Attachments: patch.txt, patch2.txt > > > During detach, it is possible for additional entities to be loaded if the openjpa.DetachState property has been set to "all" or "fetch-groups". These entities may not be included in the collection of entities that are identified in the BrokerImpl.detachAllInternal() method when it calls the DetachManager.detachAll(collection) method. Before 2.0, these newly loaded entities were always detached since the detach processing always cascaded. However, with the 2.0 spec requirements for cascade, the default behavior no longer cascades. Therefore, there may be some entities left in the persistence context after this processing occurs. detachAllInternal() is associated with the clear(), close(), and afterCompletion() operations and it is expected that the persistence context really be empty. To ensure this, the compatibility option of cascadeWithDetach will be set to true by detachAllInternal() before calling the DetachManager.detach() method. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.