Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 5188 invoked from network); 29 Oct 2008 21:31:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Oct 2008 21:31:05 -0000 Received: (qmail 66339 invoked by uid 500); 29 Oct 2008 21:31:10 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 66300 invoked by uid 500); 29 Oct 2008 21:31:10 -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 66242 invoked by uid 99); 29 Oct 2008 21:31:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2008 14:31:10 -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; Wed, 29 Oct 2008 21:30:04 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4642A234C249 for ; Wed, 29 Oct 2008 14:30:44 -0700 (PDT) Message-ID: <216343299.1225315844286.JavaMail.jira@brutus> Date: Wed, 29 Oct 2008 14:30:44 -0700 (PDT) From: "Albert Lee (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Closed: (OPENJPA-754) Un-scheduled pre/postUpdate callbacks from persist. In-Reply-To: <2099939550.1225227646342.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-754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Albert Lee closed OPENJPA-754. ------------------------------ > Un-scheduled pre/postUpdate callbacks from persist. > --------------------------------------------------- > > Key: OPENJPA-754 > URL: https://issues.apache.org/jira/browse/OPENJPA-754 > Project: OpenJPA > Issue Type: Sub-task > Components: kernel > Affects Versions: 1.0.3, 1.0.4, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, 2.0.0 > Reporter: Albert Lee > Assignee: Albert Lee > Fix For: 1.3.0, 2.0.0 > > > In some use case, an unexpected pre/postUpdate callback event will be fired. > The following operations demonstrate the scenario: > em.getTransaction().begin(); > // Create and persist a new Message entity > Message message = new Message("Hello Persistence!"); > message.setId(1); > em.persist(message); > em.flush(); > // Create and persist another new Message entity > message = new Message("Hello Persistence 2!"); > message.setId(2); > em.persist(message); > em.getTransaction().commit(); > em.getTransaction().begin(); > message.setMessage("Mutated 2!!"); > em.getTransaction().commit(); > ** PrePersist - Message: id=1, m=Hello Persistence!, create=null, updated=null, v=null > ** PostPersist - Message: id=1, m=Hello Persistence!, create=null, updated=null, v=1 > ** PrePersist - Message: id=2, m=Hello Persistence 2!, create=null, updated=null, v=null > ** PreUpdate - Message: id=1, m=Hello Persistence!, create=null, updated=null, v=1 > ** PostPersist - Message: id=2, m=Hello Persistence 2!, create=null, updated=null, v=1 > ** PostUpdate - Message: id=1, m=Hello Persistence!, create=null, updated=null, v=1 > ** PreUpdate - Message: id=2, m=Mutated 2!!, create=null, updated=null, v=1 > ** PostUpdate - Message: id=2, m=Mutated 2!!, create=null, updated=null, v=2 > Albert Lee. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.