Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 15438 invoked from network); 30 Nov 2007 03:55:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Nov 2007 03:55:50 -0000 Received: (qmail 38505 invoked by uid 500); 30 Nov 2007 03:55:37 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 38496 invoked by uid 500); 30 Nov 2007 03:55:37 -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 38487 invoked by uid 99); 30 Nov 2007 03:55:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Nov 2007 19:55:37 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cgamache@gmail.com designates 64.233.166.177 as permitted sender) Received: from [64.233.166.177] (HELO py-out-1112.google.com) (64.233.166.177) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Nov 2007 03:55:18 +0000 Received: by py-out-1112.google.com with SMTP id y63so3957186pyg for ; Thu, 29 Nov 2007 19:55:21 -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:content-transfer-encoding:content-disposition:references; bh=11ve60ULvKe8cOhR6PFrEF2Ko3qOP8CF+DMiK30+OfA=; b=W8sbUEz5Dh+3eRE881Re3/btxOjAc6H+lX6+v/SqCWG6oHhkQJ6KcuIO2dsfSzqlqPEadoWvb4bxSBoccg7JqNUx+utmGRD4WmXW9skb8Yj1VCnxBGyUSjhZ7XQqa/nyIPLN/vjy5xNIAi2lhEv/m3Oo+voDems1aj1NTgb+SzU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=thU0ymwYJgmGInyRofZQI1RMLy/wAsuK9T+E56EpxxkQbM4lkl59MXMk3HXic/voT3hId5wJpuALWVSUnTdNm++s0lX3K++FK7M3qU8ESCeEtBmgkIi3pvpMvhXgUKrDxPyK3s+c7BQcpaqklkMmOuoZ95dU42wIRRiqR1HM55c= Received: by 10.35.60.15 with SMTP id n15mr1041090pyk.1196394920719; Thu, 29 Nov 2007 19:55:20 -0800 (PST) Received: by 10.35.89.3 with HTTP; Thu, 29 Nov 2007 19:55:20 -0800 (PST) Message-ID: <9cc55f600711291955o345361d6k6a37160230608c06@mail.gmail.com> Date: Thu, 29 Nov 2007 22:55:20 -0500 From: "Chris Gamache" To: user@cayenne.apache.org Subject: Re: ExtendedType and IN operator In-Reply-To: <9cc55f600711271356x4181f0b0x3796d24cf4445a3e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <9cc55f600711221739y75045647p37205f0f131621f1@mail.gmail.com> <9cc55f600711271356x4181f0b0x3796d24cf4445a3e@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Was this enough code to make a determination? On Nov 27, 2007 4:56 PM, Chris Gamache wrote: > Exact Cayenne Version is 2.0.3 > > Here's the query builder... > > public static List selectMulti(final DataContext context,final > ArrayList userUuids, final Date fromDate, final Date toDate, > final int status) { > > ArrayList expList = new ArrayList(); > > //this is where the trouble is... > if (userUuids != null && userUuids.size() > 0) > expList.add(ExpressionFactory.inExp(TodOrders.USER_UUID_PROPERTY, > userUuids)); > > > if (fromDate != null && toDate != null) { > expList.add(ExpressionFactory.betweenExp(TodOrders.TRANS_DATE_PROPERTY, > fromDate, toDate)); > } else if (fromDate != null && toDate == null) { > expList.add(ExpressionFactory.greaterOrEqualExp(TodOrders.TRANS_DATE_PROPERTY, > fromDate)); > } else if (fromDate == null && toDate != null) { > expList.add(ExpressionFactory.lessOrEqualExp(TodOrders.TRANS_DATE_PROPERTY, > toDate)); > } > > if (status == 1) { > expList.add(ExpressionFactory.matchExp(TodOrders.FULFILLED_PROPERTY, null)); > } else if (status == 2) { > expList.add(ExpressionFactory.noMatchExp(TodOrders.FULFILLED_PROPERTY, > null)); > } > SelectQuery orderQuery = new > SelectQuery(TodOrders.class,ExpressionFactory.joinExp(Expression.AND, > expList)); > orderQuery.addOrdering(new Ordering(TodOrders.TRANS_DATE_PROPERTY, true)); > > return context.performQuery(orderQuery); > > > } > > > On Nov 26, 2007 7:42 AM, Andrus Adamchik wrote: > > Chris, > > > > I vaguely remember this being a problem in the past and us fixing > > it... I couldn't find any references via Google (having "IN" as a > > keyword doesn't help). So could you post the code that builds the > > query and the exact Cayenne version. > > > > Thanks > > Andrus > > > > > > > > On Nov 23, 2007, at 3:39 AM, Chris Gamache wrote: > > > > > I'm using Cayenne2 and PostgreSQL. > > > > > > For any single R-value in a where clause, my ExtendedType is working > > > wonderfully. But! If I create an expression which uses the operator > > > IN, my ExtendedType doesn't seem to get called. In the query logger > > > everything looks okay, but pgjdbc complains in the same way that it > > > would if there were no exended type. That leads me to believe either > > > that Cayenne is ignoring ExtendedTypes when it does the JDBC binding > > > for the R-value list, or that I've left out a detail in my > > > ExtendedType class which is the culprit. I can post my ExtendedType > > > code and some code that misbehaves. Will that suffice, or would you > > > need more? > > > > > > CG > > > > > > > >