From dev-return-5871-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Fri Aug 24 12:17:56 2007 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 20274 invoked from network); 24 Aug 2007 12:17:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Aug 2007 12:17:55 -0000 Received: (qmail 33666 invoked by uid 500); 24 Aug 2007 12:17:51 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 33637 invoked by uid 500); 24 Aug 2007 12:17:51 -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 33628 invoked by uid 99); 24 Aug 2007 12:17:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 05:17:51 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Aug 2007 12:18:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8F993714210 for ; Fri, 24 Aug 2007 05:17:31 -0700 (PDT) Message-ID: <28498533.1187957851528.JavaMail.jira@brutus> Date: Fri, 24 Aug 2007 05:17:31 -0700 (PDT) From: "Ekin Sokmen (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-333) ManyToMany relationship not handled properly while using DataCache. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org ManyToMany relationship not handled properly while using DataCache. ------------------------------------------------------------------- Key: OPENJPA-333 URL: https://issues.apache.org/jira/browse/OPENJPA-333 Project: OpenJPA Issue Type: Bug Components: datacache Affects Versions: 1.0.0 Environment: Linux Fedora 6 2.6.22.1-32.fc6 Java SE 1.5.0_11 Reporter: Ekin Sokmen Fix For: 0.9.0 We are implementing WS-methods using POJOs and OpenJPA. Following description is a simplified model of the issue we are facing. There is also a test case attached which demonstrates the described problem. Assume that we have 2 entities EntityA and EntityB in ManyToMany relationship. We are going to create a new instance of EntityA and add an existing instance of EntityB to it. We are creating a new POJO instance of EntityA and add a fully populated offline instance of EntityB to it. This instance of EntityA is serialized and sent to the server where we are just doing "persist" on this entity. Without DataCache this is working fine. If we enable DataCache and create a new instance of EntityA as described above the entity is persisted successfully but if we retrieve the instance using OpenJPA we get the instance of EntityA but the list of EntityB is not populated properly, which means we have a set of EntityB which is not null and the size is >0 but the content is just null. As a hint: if we debug the code we end up just after commit of new instance where the cache is updated. The enhanced method "pcFetchObjectId" of EntityB is called but the EntityB is a detached object so it returns null and the list of EntityB in EntityA consists of a list of nulls. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.