From dev-return-11263-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Wed Apr 01 20:45:36 2009 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 69478 invoked from network); 1 Apr 2009 20:45:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2009 20:45:36 -0000 Received: (qmail 39309 invoked by uid 500); 1 Apr 2009 20:45:36 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 39251 invoked by uid 500); 1 Apr 2009 20:45:36 -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 39241 invoked by uid 99); 1 Apr 2009 20:45:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 20:45:36 +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; Wed, 01 Apr 2009 20:45:34 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0DE77234C053 for ; Wed, 1 Apr 2009 13:45:13 -0700 (PDT) Message-ID: <1797587971.1238618713055.JavaMail.jira@brutus> Date: Wed, 1 Apr 2009 13:45:13 -0700 (PDT) From: "Catalina Wei (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Resolved: (OPENJPA-1016) JPA2 Query support for embeddables; nested embeddables; relationships from embeddables In-Reply-To: <564310636.1238615472936.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-1016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Catalina Wei resolved OPENJPA-1016. ----------------------------------- Resolution: Fixed 1. Because embeddable object will always have an owning entity, it brings up a question whether query result should materialize the owning entity. Materializing owning entity has undesired side effects; if owning entity has any eager fields, additional SQL is generated which bring in data that is not requested by query. if Person entity has an embeddable address field - "Address" is Embeddable class, the following query returns Address objects of all Person: select p.address from Person p In processing the above query, Person should not be materialized, nor any eager fields/relations of Person. For this reason, it is decided that if query is selecting embeddable objects, we only retrieve the primary key of the owning entity and save that owner id within the StateManagerImpl instance of the embeddable object. 2. Our current implementation that supports embeddable class is not OO style. Strong-typing by introducing EmbeddedStateManager would be beneficial in the long run. But this kind of structural change has big impact to kernal, cache, attach/detache, etc. > JPA2 Query support for embeddables; nested embeddables; relationships from embeddables > -------------------------------------------------------------------------------------- > > Key: OPENJPA-1016 > URL: https://issues.apache.org/jira/browse/OPENJPA-1016 > Project: OpenJPA > Issue Type: Sub-task > Components: jpa > Affects Versions: 2.0.0 > Reporter: Catalina Wei > Assignee: Catalina Wei > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.