Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 5574 invoked from network); 27 Jun 2007 13:51:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jun 2007 13:51:16 -0000 Received: (qmail 81476 invoked by uid 500); 27 Jun 2007 13:51:19 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 81456 invoked by uid 500); 27 Jun 2007 13:51:19 -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 81447 invoked by uid 99); 27 Jun 2007 13:51:19 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2007 06:51:19 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 27 Jun 2007 06:51:15 -0700 Received: (qmail 16291 invoked from network); 27 Jun 2007 13:50:55 -0000 Received: from unknown (HELO ?????o??IPv6:::1?) (127.0.0.1) by localhost with SMTP; 27 Jun 2007 13:50:55 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <8f985b960706121233h44f4d2a6g98e7c31632b4ca7e@mail.gmail.com> References: <9236FF55-C693-45B5-AD9D-27724BEEB03A@objectstyle.org> <35E28EDE-AB5E-4390-AE9E-592E7235A544@objectstyle.org> <8f985b960706121233h44f4d2a6g98e7c31632b4ca7e@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Andrus Adamchik Subject: Re: Self-join Date: Wed, 27 Jun 2007 16:50:52 +0300 To: user@cayenne.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org Just to clarify, CAY-732 is a real bug, but it is not a bug with relationships to same entity per se (those resolve just fine). This is a bug specifically related to *prefetching* on such relationships. Andrus On Jun 12, 2007, at 10:33 PM, Mike Kienenberger wrote: > Not really sure as I don't use them, but at least one issue with > self-joins is solved if you use my outer join patch for 1.2. > > https://issues.apache.org/cayenne/browse/CAY-732 > > > > On 6/12/07, Fredrik Liden wrote: >> What is the status of self joins in v. 1.2.3? >> From the 2 posts I find in the archive seems like some people are >> using >> it. >> The documentation doesn't mention it. >> Just wondering if it's ok to use or if there are any limitations that >> discourages it's use? >> >> I'm have a set of nodes. I'm guessing the source node will have >> Source_node_id NULL or 0. And then the target nodes will refer >> back to >> the source nodes Node_id. Would it be worth using self joins here or >> should I just look up the target nodes based on the source nodes >> using >> regular queries and not worry about the relations? >> >> NODE >> >> Node_id (pk) >> Text >> Source_node_id (fk) >> >> Thanks! >> Fredrik >> >