Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 30612 invoked from network); 2 Mar 2004 13:52:12 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 2 Mar 2004 13:52:12 -0000 Received: (qmail 40317 invoked by uid 500); 2 Mar 2004 13:52:04 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 40281 invoked by uid 500); 2 Mar 2004 13:52:04 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 40229 invoked from network); 2 Mar 2004 13:52:03 -0000 Received: from unknown (HELO satltrd02.novainfo.com) (198.203.191.254) by daedalus.apache.org with SMTP; 2 Mar 2004 13:52:03 -0000 Received: from 172.16.64.100 by satltrd02.novainfo.com (InterScan E-Mail VirusWall NT); Tue, 02 Mar 2004 08:51:36 -0500 Received: from SATLEXH02 [172.16.64.75] by satlxwl01.novainfo.com with XWall v3.28 ; Tue, 2 Mar 2004 08:51:35 -0500 Received: by satlexh02.novainfo.com with Internet Mail Service (5.5.2657.72) id ; Tue, 2 Mar 2004 08:51:35 -0500 Message-ID: <4CD13C22AD120746998F4C066E38DCE1085ED1@satlexh04.novainfo.com> From: Travis.Prescott@novainfo.com To: torque-user@db.apache.org Subject: RE: simple join problem Date: Tue, 2 Mar 2004 08:52:01 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Andras, Of course, when you use the "addJoin" & not the "add", it works just fine. Any idea how to use your own connection when using the *Peer join methods? As I mentioned, I need to have the application server manage the datasource for me so I have been using the methods that take a connection as well as a Criteria. Travis -----Original Message----- From: Andras Balogh [mailto:andras@reea.net] Sent: Tuesday, March 02, 2004 8:18 AM To: Apache Torque Users List Subject: Re: simple join problem Hello, You should use Crieteria.addJoin(ViRejPeer.ASSN_REJ_ID, AssnRejPeer.ASSN_REJ_ID); ot better if the relationship is declared as foriegn key in your schema you should have a protected method in you BaseViRejPeer: ViRejPeer.doSelectJoinAssnRej(crit) (or somethig like that :)) Make this method public in ViRejPeer and use it . Best wishes, Andras. Travis.Prescott@novainfo.com wrote: >I am trying to make a simple join. Below is the Criteria I am using: > > Criteria crit = new Criteria(); > crit.add(ViRejPeer.ASSN_REJ_ID, AssnRejPeer.ASSN_REJ_ID); > crit.add(AssnRejPeer.REJ_STATUS_ID, 1000); > >The query does not work because of an "invalid number". I know what is >causing the Oracle error. The Criteria produces the following query: > > SELECT * > FROM assn_rej, vi_rej > WHERE assn_rej.REJ_STATUS_ID=1000 > AND vi_rej.ASSN_REJ_ID='assn_rej.ASSN_REJ_ID' > >The cause of the problem is the assn_rej.ASSN_REJ_ID value surrounded by >quotes. If the query is run on it's own without the quotes it runs fine. >So, I started looking into the join provided by the Peer base class. The >problem with this is that we are managing our datasources with application >server so I would need to pass a connection into the join method. This >option does not exist. So my question, I suppose, is two-fold. First, what >am I doing wrong with the above Criteria. Second, is there a way to use the >join methods in the Peer classes and still pass in a Connection? > >Travis > > --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org Note: The information contained in this email and in any attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. The recipient should check this email and any attachments for the presence of viruses. Sender accepts no liability for any damages caused by any virus transmitted by this email. If you have received this email in error, please notify us immediately by replying to the message and delete the email from your computer. This e-mail is and any response to it will be unencrypted and, therefore, potentially unsecure. Thank you. NOVA Information Systems, Inc. --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org