Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 53696 invoked from network); 19 Aug 2010 19:02:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Aug 2010 19:02:08 -0000 Received: (qmail 4570 invoked by uid 500); 19 Aug 2010 19:02:08 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 4525 invoked by uid 500); 19 Aug 2010 19:02: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 4517 invoked by uid 99); 19 Aug 2010 19:02:07 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Aug 2010 19:02: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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Aug 2010 19:01:49 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7JJ1SlW006501 for ; Thu, 19 Aug 2010 19:01:28 GMT Message-ID: <13445842.452191282244488512.JavaMail.jira@thor> Date: Thu, 19 Aug 2010 15:01:28 -0400 (EDT) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1770) Inconsistent behaviour when fetching an Entity that has a null embeddable and the DataCache is enabled In-Reply-To: <29486911.447131282228395728.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-1770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Curtis updated OPENJPA-1770: --------------------------------- Fix Version/s: 2.1.0 Affects Version/s: 2.0.0 Component/s: datacache kernel > Inconsistent behaviour when fetching an Entity that has a null embeddable and the DataCache is enabled > ------------------------------------------------------------------------------------------------------ > > Key: OPENJPA-1770 > URL: https://issues.apache.org/jira/browse/OPENJPA-1770 > Project: OpenJPA > Issue Type: Bug > Components: datacache, kernel > Affects Versions: 2.0.0, 2.1.0 > Reporter: Rick Curtis > Assignee: Rick Curtis > Fix For: 2.1.0 > > Attachments: OPENJPA-1770.patch > > > While investigating the failures for OPENJPA-1469 I found that when the DataCache is enabled we behave differently when finding an Entity that has an empty/null embeddable. Take the following domain model: > @Entity > class A{ > @Id > int id; > @Embeddable > Emb emb; > ... > } > @Embeddable > class Emb{ > .... > } > The scenario where this is observed is when the datacache is not enabled and I persist Entity [A] with a null Emb. In a new persistence context I search for that same Entity, Emb is now an empty embeddable. In that same case when the datacache is enabled the find operation returns an Entity with a null embeddable. This is because the DataCache knows that Emb is null, when the data is retrieved from the database we don't know if it should be null or empty. > The datacache behavior is probably more correct, but it is inconsistent with the non-datacache behavior. Since the datacache is supposed to be transparent to the application I am going to make this two cases operate in the same manner. I asked posted this observation to the dev mailing list[1] but didn't receive any responses. > [1] http://openjpa.markmail.org/thread/xyytunrvcciv5ura -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.