Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 83711 invoked from network); 9 Jul 2009 19:50:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Jul 2009 19:50:36 -0000 Received: (qmail 58755 invoked by uid 500); 9 Jul 2009 19:50:46 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 58661 invoked by uid 500); 9 Jul 2009 19:50:46 -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 58640 invoked by uid 99); 9 Jul 2009 19:50:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Jul 2009 19:50:45 +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; Thu, 09 Jul 2009 19:50:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DA8BE29A0011 for ; Thu, 9 Jul 2009 12:50:14 -0700 (PDT) Message-ID: <859013147.1247169014876.JavaMail.jira@brutus> Date: Thu, 9 Jul 2009 12:50:14 -0700 (PDT) From: "B.J. Reed (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-732) Updates to entities via Lifecycle callback methods In-Reply-To: <1966315646.1222199504241.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-732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] B.J. Reed updated OPENJPA-732: ------------------------------ Attachment: OPENJPA-732-1.2.patch OPENJPA-732-1.0.patch Patches broke some other test cases...changing HashSet to LinkedHashSet (like current trunk version of BrokerImpl) fixes these > Updates to entities via Lifecycle callback methods > --------------------------------------------------- > > Key: OPENJPA-732 > URL: https://issues.apache.org/jira/browse/OPENJPA-732 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 1.2.1, 1.3.0 > Reporter: Kevin Sutter > Assignee: Albert Lee > Fix For: 1.3.0, 2.0.0-M2 > > Attachments: OPENJPA-732-1.0.patch, OPENJPA-732-1.2.patch, openjpa-732-test.zip > > > http://n2.nabble.com/Updates-to-entities-via-Lifecycle-callback-methods-td1110631.html > In a nutshell, if we are to allow the updating of the entities passed into the Lifecycle callback methods, then we have a couple of problems (given the scenario of updating the entity passed into the @PreUpdate method): > o The designated @Version field is getting updated more often than desired causing the transaction to rollback. > o The @PostUpdate method is getting invoked more than once. > I will post a testcase shortly. If and when we decide to fix this, this simple testcase will need to be expanded to include the updating of entities in other scenarios as well. > I am also getting verification from the JPA Expert Group as to whether these entities are supposed to be updatable or not. As one of the dev postings indicated, our OpenJPA documentation indicates that they are updatable. But, the JPA spec itself is not clear on this capability. Other vendors, such as Hibernate, allow for this. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.