Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 71401 invoked from network); 25 Jun 2007 08:40:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jun 2007 08:40:15 -0000 Received: (qmail 2361 invoked by uid 500); 25 Jun 2007 08:40:17 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 2350 invoked by uid 500); 25 Jun 2007 08:40:17 -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 2341 invoked by uid 99); 25 Jun 2007 08:40:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jun 2007 01:40:17 -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; Mon, 25 Jun 2007 01:40:13 -0700 Received: (qmail 21295 invoked from network); 25 Jun 2007 08:39:52 -0000 Received: from unknown (HELO ?????o??IPv6:::1?) (127.0.0.1) by localhost with SMTP; 25 Jun 2007 08:39:52 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <8f985b960706210815s5856d089y7e7617086677ee25@mail.gmail.com> References: <8f985b960706210815s5856d089y7e7617086677ee25@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: Relationships across databases Date: Mon, 25 Jun 2007 11:39:52 +0300 To: user@cayenne.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org On Jun 21, 2007, at 6:15 PM, Mike Kienenberger wrote: > but there's no reason that Cayenne could not attempt to > solve it down the road. +1. I think we can devise a sensible algorithm along the following lines: * Split the qualifier into DB-specific parts * Fetch the root entity with its own qualifier (obtained above) * Add prefetches for all cross-DB relationships. * Iterate through the result list in-memory applying remaining qualifiers, filtering matching objects. This obviously won't scale to very large result sets, but it can still be useful. Jira anyone? Andrus