Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 55814 invoked from network); 16 Jan 2009 16:24:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jan 2009 16:24:17 -0000 Received: (qmail 61009 invoked by uid 500); 16 Jan 2009 16:24:16 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 60995 invoked by uid 500); 16 Jan 2009 16:24:16 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 60984 invoked by uid 99); 16 Jan 2009 16:24:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jan 2009 08:24:16 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of razumovsky.andrey@gmail.com designates 74.125.44.153 as permitted sender) Received: from [74.125.44.153] (HELO yx-out-1718.google.com) (74.125.44.153) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jan 2009 16:24:09 +0000 Received: by yx-out-1718.google.com with SMTP id 3so662242yxi.82 for ; Fri, 16 Jan 2009 08:23:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=esr4m2hA1kfop3wVk2Vbev4FkMppTKo6714VpBjtYrw=; b=KVfxLwnIM7Cg8RlbHPQ82Uf+Dfro+Lx5+7txbws3MC4naznEe6ybAEAWUBXofiD5dr BqfRTyoLtKEcq89B4rZSZCCGM23e259dMJHV4yc6BwX0/M1fyAcAmqBuPMdk/dRD8aZa zBMzWf/E5PtwSvgD/0h4DTs1Pr6M2wVd4MmZo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=Rf+Tma1AnNkvwm4iP4FIRZho22x4v9zqIF89dFPdaRR3mZ1Uk12ZZzKIYSwfp9ljJi wIEQtCFSBwuQi8pXanUiB1gUToZSxlvDEF4c4dwuhKQ0sF+/mVDvsDXZgj/XEOpYOu4b WIRY79KxX0iX+14pIi+SOq4vie151/9tTsAE0= Received: by 10.151.44.15 with SMTP id w15mr453615ybj.51.1232123028600; Fri, 16 Jan 2009 08:23:48 -0800 (PST) Received: by 10.151.74.13 with HTTP; Fri, 16 Jan 2009 08:23:48 -0800 (PST) Message-ID: <3219fff70901160823o578e9cb8v755f255af2d35f11@mail.gmail.com> Date: Fri, 16 Jan 2009 19:23:48 +0300 From: "Andrey Razumovsky" To: user@cayenne.apache.org Subject: Re: How to? In-Reply-To: <65c149fc0901160800ib6f9323p5be480ca58e5cb94@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_350610_16067593.1232123028593" References: <65c149fc0901151134v4bc3ff43raac5d37f7370947@mail.gmail.com> <164F4F39-97A8-4BAB-A863-E8B220FF00A8@objectstyle.org> <65c149fc0901160514v4d5108e4y655ac87e567f32cb@mail.gmail.com> <65c149fc0901160526m34338299j56d79d1010e4d86a@mail.gmail.com> <65c149fc0901160535o73629dfcld8df0b8f21985b61@mail.gmail.com> <08819CFA-5C07-4097-B732-827DD6C066E6@objectstyle.org> <65c149fc0901160552q1c0e61b7n3eb1692a54c3c081@mail.gmail.com> <65c149fc0901160800ib6f9323p5be480ca58e5cb94@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_350610_16067593.1232123028593 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Expressions are immutable, so "qualifier4.orExp(qualifier3)" does nothing. You need to do something like qualifier4 = qualifier4.orExp(qualifier3); 2009/1/16 Sid Ferreira > Ok, worked and fixed, but not 100%... Now Im using: > > qualifier1 = ExpressionFactory.matchDbExp("cd_cliente", 10); > qualifier2 = > ExpressionFactory.likeIgnoreCaseExp(UsuariosClientes.NM_PESSOA_PROPERTY, > "%"+dsQuery+"%"); > qualifier3 = > ExpressionFactory.likeIgnoreCaseExp(UsuariosClientes.DS_CARGO_PROPERTY, > "%"+dsQuery+"%"); > qualifier4 = > > ExpressionFactory.likeIgnoreCaseExp(UsuariosClientes.DS_DEPARTAMENTO_PROPERTY, > "%"+dsQuery+"%"); > qualifier4.orExp(qualifier3); > qualifier3.orExp(qualifier2); > qualifier1.andExp(qualifier2); > select1 = new SelectQuery(UsuariosClientes.class); > select1.orQualifier(qualifier2); > > But the SQL: > SELECT * > > FROM public.usuarios_clientes t0 > WHERE t0.nm_pessoa ILIKE ? > > What is wrong? Seem that it takes only one of the parameters... > > On Fri, Jan 16, 2009 at 11:52 AM, Sid Ferreira wrote: > > > Cache... seem that I wasn't refreshing properly my application...Anyway, > > trying again the pk field... > > > > > > On Fri, Jan 16, 2009 at 11:38 AM, Andrus Adamchik < > andrus@objectstyle.org>wrote: > > > >> > >> On Jan 16, 2009, at 3:35 PM, Sid Ferreira wrote: > >> > >> a long > >>> > >> > >> And what SQL did it generate? Was there an exception? > >> > >> Andrus > >> > > > > > > > > -- > > Sidney G B Ferreira > > Desenvolvedor Web - Tibox Innovations > > > > > > > -- > Sidney G B Ferreira > Desenvolvedor Web - Tibox Innovations > ------=_Part_350610_16067593.1232123028593--