Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 25621 invoked from network); 28 May 2009 21:21:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 May 2009 21:21:55 -0000 Received: (qmail 19959 invoked by uid 500); 28 May 2009 21:22:07 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 19915 invoked by uid 500); 28 May 2009 21:22: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 19904 invoked by uid 99); 28 May 2009 21:22:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2009 21:22:07 +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, 28 May 2009 21:22:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8906B234C004 for ; Thu, 28 May 2009 14:21:45 -0700 (PDT) Message-ID: <1187058511.1243545705546.JavaMail.jira@brutus> Date: Thu, 28 May 2009 14:21:45 -0700 (PDT) From: "Jim Guo (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1109) Entry get lost when attachCollection In-Reply-To: <317274937.1243545585570.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-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jim Guo updated OPENJPA-1109: ----------------------------- Attachment: jira-test-case.zip A simple test case, Add two OrderSku in the OrderShipment.skus set, after merge, only one entry returned in the set. But all db was populated correctly and if we do a load, the set will be build up correctly. > Entry get lost when attachCollection > ------------------------------------ > > Key: OPENJPA-1109 > URL: https://issues.apache.org/jira/browse/OPENJPA-1109 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 1.2.1 > Environment: N/A > Reporter: Jim Guo > Attachments: jira-test-case.zip > > > This has been a problem when merge a parent object, the parent object has a set with child as entry. The child object equals() method are rely on child.key property. > In some case, the parent.children set was attached before the child.key property was attached. Then only one entry will be in the set since the children are equals() with child.key=null. > Possible solution: Move collection to be process last while attach an object. This give a chance for all other single property been attached, so it won't break the equals() logic. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.