Return-Path: Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 153 invoked by uid 500); 13 Aug 2003 09:33:01 -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 137 invoked from network); 13 Aug 2003 09:33:00 -0000 Received: from reea.ms.fx.ro (HELO gw.reea.net) (193.230.173.18) by daedalus.apache.org with SMTP; 13 Aug 2003 09:33:00 -0000 Received: from andras (andras.ms.reea.net [192.168.0.2]) by gw.reea.net (8.12.8/8.12.8) with SMTP id h7D9YTwv022469 for ; Wed, 13 Aug 2003 12:34:30 +0300 Message-ID: <009801c3617d$f9e35f60$0200a8c0@andras> From: "Andras Balogh" To: "Apache Torque Users List" References: Subject: Re: Peers class executeQuery mehtod (raw SQL queries) Date: Wed, 13 Aug 2003 12:33:37 +0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0095_01C36197.1E7C6290" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0095_01C36197.1E7C6290 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, If you execute queries directly with BasePeer.executeQuery=20 than Torque won't return a List of your Objects.=20 It will be a List of com.workingdogs.village.Record objects. Best wishes, Andras. In Peers Howto guide under the section Criteria Objects I found = the follwoing sentence "Criteria can also be used to do some other sql = function like ORDER BY or DISTINCT. If Criteria is too limited for your = purposes (which should not happen often) you are still free to use raw = sql queries.". If I understand it correctly I am able to pass raw sql = string to some of the Peers class method to perform the fuction I = required. I try this with "executeQuery(String sql)" method but it = doesn't seem to work. The method execute but when I try to obtain the = list of Data Objects and iterate through it, the code throw = TorqueException with message "null". I want to use raw sql queries when = I want to submit the query like "select col1, col2, col3 from table1 for = update nowait" to lock a particular record on Oracle database. I have = post this question before never get the proper answer or example on how = to do it. I hope this time some body can provide the answer or confirm = that the above method does not work. Please do not suggest that I should = not use record level locking for performance reason. I get this kind of = answer before, please answer the exact question above. I need to use = locking in my application. Thank you for your valuable time and answer. Regards, ------=_NextPart_000_0095_01C36197.1E7C6290--