Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 22235 invoked from network); 1 Jun 2005 12:37:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jun 2005 12:37:41 -0000 Received: (qmail 21654 invoked by uid 500); 1 Jun 2005 12:37:39 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 21615 invoked by uid 500); 1 Jun 2005 12:37:38 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 21580 invoked by uid 99); 1 Jun 2005 12:37:38 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from reea.mures.rdsnet.ro (HELO gw.reea.net) (213.157.167.146) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 01 Jun 2005 05:37:37 -0700 Received: from [192.168.0.2] (andras.ms.reea.net [192.168.0.2]) by gw.reea.net (8.12.8/8.12.8) with ESMTP id j51CbHeN004383 for ; Wed, 1 Jun 2005 15:37:19 +0300 Message-ID: <429DAC2B.5060500@reea.net> Date: Wed, 01 Jun 2005 15:38:03 +0300 From: Andras Balogh User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache Torque Users List Subject: Re: Help With Criteria for Special SQL References: <429DA1A4.5040406@fox5.co.za> In-Reply-To: <429DA1A4.5040406@fox5.co.za> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, This should be possible with Criteria.CUSTOM, check here: http://db.apache.org/torque/criteria-howto.html I think in your case it would be something like: crit.add(CategoryPeer.CODE ,(Object)"Category.CODE + '%' LIKE '1' ",Criteria.CUSTOM); Best regards, Andras. Trevor Miller wrote: > Hi, > > Is it possible to do the following select statement using a Criteria? > I can't seem to figure out how to do it. > > SQL: > SELECT * FROM Category, ExtraCategoryInfo WHERE Category.CODE + '%' > LIKE '1'; > > It seems strange but it actually works. > > Any help would be greatly appreciated. > > PS, any developers reading, keep up the good work, torque is excellent > ;o) > > --------------------------------------------------------------------- > 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