Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 1613 invoked from network); 8 Oct 2009 17:58:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Oct 2009 17:58:05 -0000 Received: (qmail 13773 invoked by uid 500); 8 Oct 2009 17:58:04 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 13730 invoked by uid 500); 8 Oct 2009 17:58:04 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 13720 invoked by uid 99); 8 Oct 2009 17:58:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Oct 2009 17:58:04 +0000 X-ASF-Spam-Status: No, hits=-0.6 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.18.2.165] (HELO exprod7og106.obsmtp.com) (64.18.2.165) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 08 Oct 2009 17:57:53 +0000 Received: from source ([209.85.216.202]) by exprod7ob106.postini.com ([64.18.6.12]) with SMTP ID DSNKSs4oC73hcHIyMc7odqT9Pnm+LcQ/FAev@postini.com; Thu, 08 Oct 2009 10:57:33 PDT Received: by mail-px0-f202.google.com with SMTP id 40so6523572pxi.24 for ; Thu, 08 Oct 2009 10:57:31 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.140.21 with SMTP id n21mr196583rvd.88.1255024651065; Thu, 08 Oct 2009 10:57:31 -0700 (PDT) In-Reply-To: <1254281243618-3740471.post@n2.nabble.com> References: <72c1350f0909290913r125db9dfmecaef6be27ad9b0d@mail.gmail.com> <1254281243618-3740471.post@n2.nabble.com> Date: Thu, 8 Oct 2009 13:57:31 -0400 Message-ID: Subject: Re: noob: understanding dynamic fetch modes From: Daryl Stultz To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=000e0cd22bf482da2204757032bf X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd22bf482da2204757032bf Content-Type: text/plain; charset=ISO-8859-1 On Tue, Sep 29, 2009 at 11:27 PM, Pinaki Poddar wrote: > > > ojem.getFetchPlan().addField(A.class, "B"); > > Mike is right. > > I have discovered that in addition to Mike being right, Daryl is wrong. It seems I was confounded by a bug where the parent entity is not being returned for each child. I would think this would work fine for a single field value: select a from A as a join fetch a.b This avoids having to cast into OpenJPA. -- Daryl Stultz _____________________________________ 6 Degrees Software and Consulting, Inc. http://www.6degrees.com mailto:daryl@6degrees.com --000e0cd22bf482da2204757032bf--