Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 68639 invoked from network); 10 May 2010 19:24:57 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 May 2010 19:24:57 -0000 Received: (qmail 2085 invoked by uid 500); 10 May 2010 19:24:57 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 2056 invoked by uid 500); 10 May 2010 19:24:57 -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 2048 invoked by uid 99); 10 May 2010 19:24:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 May 2010 19:24:57 +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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 May 2010 19:24:55 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4AJOXQh025777 for ; Mon, 10 May 2010 19:24:34 GMT Message-ID: <27041625.1931273519473656.JavaMail.jira@thor> Date: Mon, 10 May 2010 15:24:33 -0400 (EDT) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Assigned: (OPENJPA-1644) Null field values after calling EntityManager.remove() In-Reply-To: <22018597.30611272624533101.JavaMail.jira@thor> 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-1644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Curtis reassigned OPENJPA-1644: ------------------------------------ Assignee: Rick Curtis > Null field values after calling EntityManager.remove() > ------------------------------------------------------ > > Key: OPENJPA-1644 > URL: https://issues.apache.org/jira/browse/OPENJPA-1644 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 1.2.2, 2.0.0 > Reporter: Leo Isiah Sambayan > Assignee: Rick Curtis > Attachments: OPENJPA-1644.patch > > > Fields of an entity instance are nulled after calling EntityManager.remove() on an instance. > For example, I have an entity class named User. I persist and then remove an instance of User. > // > // EntityManager em is initialized before the following code > // > em.getTransaction().begin(); > User user = new User(); > user.setName("name1"); > em.persist(user); > em.getTransaction().commit(); > System.out.println(user.getName); // will print out name1 > em.getTransaction().begin(); > em.remove(user); > em.getTransaction().commit(); > System.out.println(user.getName); // will print out null (oh no!) > After I persist and remove the same instance of User, it's fields became null. I believe this shouldn't be the case as Section "3.2.3 Removal" of the 2.0 spec states: > "After an entity has been removed, its state (except for generated state) will be that of the entity at the point at which the remove operation was called." -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.