Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 25988 invoked from network); 13 Sep 2007 11:35:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Sep 2007 11:35:57 -0000 Received: (qmail 95659 invoked by uid 500); 13 Sep 2007 11:35:50 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 95635 invoked by uid 500); 13 Sep 2007 11:35:50 -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 95624 invoked by uid 99); 13 Sep 2007 11:35:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2007 04:35:50 -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; Thu, 13 Sep 2007 11:37:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3123571403F for ; Thu, 13 Sep 2007 04:35:34 -0700 (PDT) Message-ID: <27777057.1189683333623.JavaMail.jira@brutus> Date: Thu, 13 Sep 2007 04:35:33 -0700 (PDT) From: "Ekin Sokmen (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-333) ManyToMany relationship not handled properly while using DataCache. In-Reply-To: <28498533.1187957851528.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-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ekin Sokmen updated OPENJPA-333: -------------------------------- Affects Version/s: 1.1.0 Updated affected versions of this issue. Tested same test case with following revisions without success : 550774, 570948, 574997. > 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, 1.1.0 > Environment: Linux Fedora 6 2.6.22.1-32.fc6 > Java SE 1.5.0_11 > Reporter: Ekin Sokmen > Attachments: error_results.zip, JIRA333Success.doc, testcase.zip > > > 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.