From torque-user-return-5674-apmail-db-torque-user-archive=db.apache.org@db.apache.org Wed Dec 22 22:33:31 2004 Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 83899 invoked from network); 22 Dec 2004 22:33:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 22 Dec 2004 22:33:31 -0000 Received: (qmail 88446 invoked by uid 500); 22 Dec 2004 22:33:28 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 88274 invoked by uid 500); 22 Dec 2004 22:33:27 -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 88260 invoked by uid 99); 22 Dec 2004 22:33:27 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from perdition2.onetel.net.uk (HELO perdition2.onetel.net.uk) (212.67.120.102) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 22 Dec 2004 14:33:24 -0800 Received: (qmail 28639 invoked from network); 22 Dec 2004 21:45:41 -0000 Received: from unknown (HELO bolek.coachhouse) (213.78.127.224) by perd2 with SMTP; 22 Dec 2004 21:45:41 -0000 Received: (Exim 3.36) #1 (Debian)) protocol: esmtp id 1ChF2V-0002gg-00 ; Wed, 22 Dec 2004 22:33:03 +0000 Message-ID: <41C9F61E.6040205@numerixtechnology.de> Date: Wed, 22 Dec 2004 22:33:02 +0000 From: T E Schmitz Reply-To: mailreg@numerixtechnology.de User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache Torque Users List Subject: Re: is this really the way to combine several =?UTF-8?B?b3LCtHMg?= =?UTF-8?B?Pw==?= References: <41C995E6.1010505@evamann.de> In-Reply-To: <41C995E6.1010505@evamann.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hallo Alex, Alex Hepp wrote: > what i want now is this: > SELECT * FROM movii_user where (FIRST_NAME LIKE "%hello%" or LAST_NAME > LIKE "%hello%" OR EMAIL LIKE "%hello%" or LOGIN_NAME="%hello%") AND > IS_DELETED=0; > > ************************ > **CODE > ************************ > Criteria crit = new Criteria(); > crit.add(MoviiUser.IS_DELETED,0); > > [...] > > Criteria.crit.add( a1.or( a2.or(a3.or(a4)) )); > ************************ > **CODE END > ************************ > > is this really the right way, or am i completely wrong? It´s working This is exactly it. Particularly when using the same column in more than one condition you *have to* use Criterions and "or" or "and" them together. Criteria is based on a HashMap with the column name as the key. If you Criteria.add'ed a column condition it would overwrite the previously added condition (for the same column). -- Regards/Gruß, Tarlika Elisabeth Schmitz --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org