Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 66630 invoked from network); 16 Mar 2007 18:27:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Mar 2007 18:27:30 -0000 Received: (qmail 29022 invoked by uid 500); 16 Mar 2007 18:27:38 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 29006 invoked by uid 500); 16 Mar 2007 18:27:37 -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 28997 invoked by uid 99); 16 Mar 2007 18:27:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2007 11:27:37 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mkienenb@gmail.com designates 66.249.90.177 as permitted sender) Received: from [66.249.90.177] (HELO ik-out-1112.google.com) (66.249.90.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2007 11:27:28 -0700 Received: by ik-out-1112.google.com with SMTP id c30so572060ika for ; Fri, 16 Mar 2007 11:27:06 -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:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Mxz9018L65z4ygDGh+zcVV6icjakNd+8gzvXNbYmT9DVVb4wdUy0gxNjVibOu/wum7NeR8vFXTrEJ5ZI0/j/UvvPuUSjQZzEAwXfTt0jDwvH0zy9/lFj7VRpI1+UH5bM6pcDeiaAUqku03DpVEgvglxFTPNZC47xL4IUvQquNj4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lw4Wb07u5PO7d76uPjcWYt2ANKQhVL2SIv7noQyQGiCUZLavZtuT/y6V5V+aGQ0t5+TKJ3IwGjQxluKnYjRziyBxq53PbgRw48BM1pmrwdCvrQPe1UZlKiuoNeOC6bPfjNRSGaNlapk0MsV7E5USOD4IYscEvIpb50BltOaqvM4= Received: by 10.114.107.19 with SMTP id f19mr840370wac.1174069625637; Fri, 16 Mar 2007 11:27:05 -0700 (PDT) Received: by 10.114.160.3 with HTTP; Fri, 16 Mar 2007 11:27:05 -0700 (PDT) Message-ID: <8f985b960703161127r1e3c3dc7h59efe148f9af2324@mail.gmail.com> Date: Fri, 16 Mar 2007 14:27:05 -0400 From: "Mike Kienenberger" To: user@cayenne.apache.org Subject: Re: Running a query over multiple Databases? In-Reply-To: <4806649A-89B8-4C74-9D32-A71273117056@objectstyle.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8D18DE0A-4441-42BF-ADF0-B75913F79024@freenet.de> <4806649A-89B8-4C74-9D32-A71273117056@objectstyle.org> X-Virus-Checked: Checked by ClamAV on apache.org Certain databases on the same server will also let you do this, if configured correctly. For instance, if all of your databases are on the same Oracle database server, and you've granted appropriate privileges to your current user, it'll work. Mind you, this doesn't help a great deal :-) On 3/16/07, Andrus Adamchik wrote: > Doing a join across DB's generally doesn't work (although it may > *appear* to work in simpler cases of matching of FK), as it will > require Cayenne to do in memory cartesian product processing. So > you'll have to do it manually. > > (actually sounds like an interesting improvement ... although > probably low priority to me at least) > > Andrus > > > On Mar 16, 2007, at 5:26 PM, Christian Mittendorf wrote: > > Hi! > > > > I've found the mutiple database example on cayennes homepage: > > > > http://cwiki.apache.org/CAY/multiple-databases-example.html > > > > That example is a pretty good resemblance of our current problem. > > > > What we would like to do is to run a single query over both > > databases, like i.e. > > > > SelectQuery select = new SelectQuery(Person.class); > > Expression expression = ExpressionFactory.matchExp > > (Person.DEPARTMENT_PROPERTY + > > "." + Department.NAME_PROPERTY, "IT Department"); > > > > But such a query runs into an exception with the following error > > message: > > > > Base table or view not found, message from server: "Table > > 'foo.bar' doesn't exist" > > > > Are such queries supported by Cayenne or do we have to split the > > task into > > two single queries? > > > > Christian > > > >