Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ACC61999E for ; Mon, 12 Mar 2012 21:25:09 +0000 (UTC) Received: (qmail 35096 invoked by uid 500); 12 Mar 2012 21:25:09 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 35075 invoked by uid 500); 12 Mar 2012 21:25:09 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 35066 invoked by uid 99); 12 Mar 2012 21:25:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2012 21:25:09 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of johnthuss@gmail.com designates 209.85.213.171 as permitted sender) Received: from [209.85.213.171] (HELO mail-yx0-f171.google.com) (209.85.213.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2012 21:25:01 +0000 Received: by yenl11 with SMTP id l11so4764769yen.16 for ; Mon, 12 Mar 2012 14:24:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Qeo+4s7BSWbVV2Y5kmoK8IDcK/pHp2UwB6/TQDRXv3Y=; b=C2/KZfCvTSzeLY1GHdPkRRm7XZdJBLeBYA7cowpgDGkwasqWpE1fJKKdy7ibgCMjZI BuNR/+eU0neC408dHnbkx+pQ7IPFOUFm8dCSa1ptJqqTPYeNoNg7Ss863Zh4LTtGJ326 Aao6a97icI8xA+W38QSSIs4Q0eOnMm+m37iUKaLDKZtuACIyGyFM0CmPdzpYB35Rivs0 P6umYE2QBwZMi3VFQynL0IEhYJGMLDhMujZqmt48jgk2R5xVO6ZIt9lYAJh5HdKQqIno TTc1LUuPynYz8iMtxG5SN7KksfzUh1UbmDMpgMHp+IbV1UqnJ0WrK8hPISKJHP2zmqle OXWQ== MIME-Version: 1.0 Received: by 10.224.199.202 with SMTP id et10mr9904383qab.60.1331587480404; Mon, 12 Mar 2012 14:24:40 -0700 (PDT) Received: by 10.229.41.4 with HTTP; Mon, 12 Mar 2012 14:24:40 -0700 (PDT) In-Reply-To: References: Date: Mon, 12 Mar 2012 16:24:40 -0500 Message-ID: Subject: Re: Auto-creation of reverse relationships From: John Huss To: "user@cayenne.apache.org" Content-Type: multipart/alternative; boundary=20cf300fb101c1c3af04bb125ea2 X-Virus-Checked: Checked by ClamAV on apache.org --20cf300fb101c1c3af04bb125ea2 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Feb 28, 2012 at 10:34 PM, John Huss wrote: > My entity classes use explicit fields to store data instead of a Map, so > when it tries to access the "runtimeRelationshipX" fields it blows up > because these don't exist in the generated java classes. I've dealt with > it so far by just modeling all the relationships so that the fields are > there to hold the data. But now I'm using more introspection and having > these unnecessary relationships is requiring workaround that I would prefer > not to have. > > I did try turning this off today and thus far everything seems ok, but > there is a lot more to test to be sure. > So, just to follow up on this... I did run into some problems - one was when adding some prefetches to a query it would look for the reverse relationship and blow up. There was another occurrence elsewhere too, but I don't recall where. So I turned back on the creation of the reverse DbRelationships only and that seems to work well. These "unneeded" DbRelationships don't hurt anything and still keep my entity classes free of accessors for relationships that I don't want. So my question now is, it is ok if I submit a patch to make it optional to create the reverse ObjRelationships? I would probably use a property to configure it, but maybe there is a better way. Thanks, John --20cf300fb101c1c3af04bb125ea2--