From dev-return-9947-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Mon Dec 22 19:17:07 2008 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 28351 invoked from network); 22 Dec 2008 19:17:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Dec 2008 19:17:07 -0000 Received: (qmail 50589 invoked by uid 500); 22 Dec 2008 19:17:07 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 50554 invoked by uid 500); 22 Dec 2008 19:17:07 -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 50543 invoked by uid 99); 22 Dec 2008 19:17:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Dec 2008 11:17:07 -0800 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; Mon, 22 Dec 2008 19:17:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3ABE7234C2CB for ; Mon, 22 Dec 2008 11:16:44 -0800 (PST) Message-ID: <674230661.1229973404233.JavaMail.jira@brutus> Date: Mon, 22 Dec 2008 11:16:44 -0800 (PST) From: "Dinkar Rao (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-843) Unnecessary version update on inverse-side of a 1-m relationship MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Unnecessary version update on inverse-side of a 1-m relationship ---------------------------------------------------------------- Key: OPENJPA-843 URL: https://issues.apache.org/jira/browse/OPENJPA-843 Project: OpenJPA Issue Type: Bug Components: jdbc Affects Versions: 2.0.0 Reporter: Dinkar Rao Priority: Minor A Customer has 1-m relationship to Inventory: @Entity Customer { .... @OneToMany(mappedBy=3D"customer") private Collection inventories =3D new ArrayList(= ); .... } @Entity Inventory { ... @ManyToOne private Customer customer; ... } When an Inventory instance is modified, its version is bumped as expected. = However, when an Inventory is added or deleted from the Inventory list in = Customer, the Customer instance version is unnecessarily bumped up. Accordi= ng to section 3.4.2 of the 1.0 spec, "The version attribute is updated by the persistence provider runtime when = the object is=20 written to the database. All non-relationship =EF=AC=81elds and properties = and all relationships=20 owned by the entity are included in version checks." When additions or deletions are made to the Inventory list of Customer, the= version of the Customer instance should remain unchanged. As the inverse-s= ide, Customer does not own the Inventory that is added/deleted.=20 --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.