From dev-return-5852-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Thu Aug 23 14:13:25 2007 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 92447 invoked from network); 23 Aug 2007 14:12:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Aug 2007 14:12:54 -0000 Received: (qmail 82091 invoked by uid 500); 23 Aug 2007 14:12:44 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 82058 invoked by uid 500); 23 Aug 2007 14:12:44 -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 82038 invoked by uid 99); 23 Aug 2007 14:12:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2007 07:12:44 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kwsutter@gmail.com designates 209.85.198.185 as permitted sender) Received: from [209.85.198.185] (HELO rv-out-0910.google.com) (209.85.198.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Aug 2007 14:12:43 +0000 Received: by rv-out-0910.google.com with SMTP id k20so420139rvb for ; Thu, 23 Aug 2007 07:12:23 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=c5ijQ7v18AJKYiDDdDegjaToE3YLdY52XWzNM5magq1ZZG004l/xdppV/uj4h1w/3H7S0fXy5rb7vKbkxoHQ3WcKDJ9Qc0IC0/VfZWgr65CALJpY6AhWRyTrUO+/gPAXV8vcadLiTLH80tOAIYKdllNRoQL34s1ZFvdLQFzIecA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=DrjdwIq9a9z5P57EnIXTihniF/IFXzTklMmSo31zoBYpDgadnXl7NC5thByc3/+Lb/U55ieGSkA+f6uzuaFCsiZUBSAvJ2R3RLNKt4zIDHVQdI5FTO9VcuA0VPE5moCOePdGAOrRrA45qs67gyWhwaS579+mgIGgxbgc2vP+E6Y= Received: by 10.114.155.1 with SMTP id c1mr890286wae.1187878343217; Thu, 23 Aug 2007 07:12:23 -0700 (PDT) Received: by 10.114.75.15 with HTTP; Thu, 23 Aug 2007 07:12:23 -0700 (PDT) Message-ID: <89c0c52c0708230712l28e3a596m326f307f70092e1c@mail.gmail.com> Date: Thu, 23 Aug 2007 09:12:23 -0500 From: "Kevin Sutter" To: dev@openjpa.apache.org Subject: Limitations of eager fetching? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_64456_31528801.1187878343185" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_64456_31528801.1187878343185 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Guys, Can someone help me interpret a limitation specified in section 7.2: - Once OpenJPA eager-joins into a class, it cannot issue any further eager to-many joins or parallel selects from that class in the same query. To-one joins, however, can recurse to any level. So, if I have the following code, am I hitting this limitation? public abstract class AbstractCustomer implements Serializable { ... @OneToOne(fetch = FetchType.EAGER) @JoinColumns({@JoinColumn(name="OPEN_ORDER", referencedColumnName = "ORDER_ID")}) protected Order openOrder; public class Order implements Serializable { ... @OneToMany(fetch=FetchType.LAZY) @ElementJoinColumn(name="ORDER_ID",referencedColumnName="ORDER_ID") protected Set lineitems; In order to load all LineItems Eagerly, I have to start from Order (vs starting from Customer). If I do an em.find() on Customer. Even if I specify Eager from Order to LineItems, it will not load the LineItems Eagerly. Only if I do an em.findon the Order will I get the Join because LineItems is a collection. Have I interpretted the limitation correctly? And, if so, can somebody provide some background on this limitation and what it would take to remove it? I'm still not 100% comfortable with this area of the code... :-) Thanks! Kevin ------=_Part_64456_31528801.1187878343185--