Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 91797 invoked from network); 25 Aug 2010 13:22:41 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Aug 2010 13:22:41 -0000 Received: (qmail 13367 invoked by uid 500); 25 Aug 2010 13:22:41 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 13254 invoked by uid 500); 25 Aug 2010 13:22:39 -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 13246 invoked by uid 99); 25 Aug 2010 13:22:38 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Aug 2010 13:22:38 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.82.171] (HELO mail-wy0-f171.google.com) (74.125.82.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Aug 2010 13:22:16 +0000 Received: by wyb29 with SMTP id 29so732597wyb.16 for ; Wed, 25 Aug 2010 06:21:55 -0700 (PDT) Received: by 10.227.134.138 with SMTP id j10mr6905554wbt.207.1282742515392; Wed, 25 Aug 2010 06:21:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.230.197 with HTTP; Wed, 25 Aug 2010 06:21:35 -0700 (PDT) In-Reply-To: <4C751111.50704@gmail.com> References: <4C751111.50704@gmail.com> From: Michael Gentry Date: Wed, 25 Aug 2010 09:21:35 -0400 Message-ID: Subject: Re: Escaping of characters in like/likeIgnoreCase expressions To: user@cayenne.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Victor, What does your Expression.fromString() look like? If I recall correctly, a % or _ in the substitution map will automatically be escaped for you, but the actual fromString("...") part will not. mrg On Wed, Aug 25, 2010 at 8:48 AM, Victor Antonovich wrote: > Hello! > > What is correct way of escaping of '%' and '_' characters in query > like/likeIgnoreCase expressions? Looks like escape chars can be specified > when Expression instances are created using ExpressionFactory methods, but > what about expression string representation to use with > Expression.fromString() method? > > Thanks, > Victor. >