Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 93233 invoked from network); 14 Jul 2004 09:08:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 14 Jul 2004 09:08:25 -0000 Received: (qmail 27312 invoked by uid 500); 14 Jul 2004 09:08:23 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 27300 invoked by uid 500); 14 Jul 2004 09:08:22 -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 27286 invoked by uid 99); 14 Jul 2004 09:08:22 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [213.94.78.66] (HELO mail.drei.com) (213.94.78.66) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 14 Jul 2004 02:08:21 -0700 Received: from AVMX01.at-work.local ([172.25.1.157]) by mail.drei.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 14 Jul 2004 11:08:18 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Criteria parses to "SELECT FROM .." Date: Wed, 14 Jul 2004 11:08:18 +0200 Message-ID: <77C00D6EB4014440829F15BC0D0A3EC56CE2C5@AVMX01.at-work.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Criteria parses to "SELECT FROM .." Thread-Index: AcRpgPoZzdNvaZYERZeapOVeTwoO3QAAP51g From: =?iso-8859-1?Q?=22G=F6schl=2CSiegfried=22?= To: "Apache Torque Users List" X-OriginalArrivalTime: 14 Jul 2004 09:08:18.0968 (UTC) FILETIME=[1ACF6180:01C46982] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Thomas, A good approach is to use P6Spy to trace ALL SQL statements generated by = Torque Cheers, Siegfried Goeschl -----Original Message----- From: Thomas Fischer [mailto:Fischer@seitenbau.net]=20 Sent: Mittwoch, 14. Juli 2004 11:00 To: Apache Torque Users List Subject: RE: Criteria parses to "SELECT FROM .." Hi Ron, I guess the point is that in every Peer class for a database table, in = the method doSelectVillageRecords(Criteria criteria, Connection con) = which is called from the usual doSelect(criteria), the following call is = made BEFORE the criteria is converted to a query: if (criteria.getSelectColumns().size() =3D=3D 0) { addSelectColumns(criteria); } This explains why you dont see any select columns if you print the query = before you call the doSelectMethod. So adding = System.out.println(createQueryString(c)); AFTER calling doSelect should print the correct Columns... There are more pitfalls like this if you use createQueryString() = yourself, so if you want to know which Query is actually executed is the = Torque Debug log !!! >> c.add(CATEGORIES_ID, id); >> c.add(LANGUAGE_ID, language.getLanguagesId()); >> try { >> System.out.println(createQueryString(c)); >> return doSelect(c); >> } >> catch (TorqueException ex) { >> ex.printStackTrace(); >> return EMPTY; >> } I do not see any error in this code. What exactly happens if you execite = the code ? Hope that helps, Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org