Actually support for escape char was added per CAY-1380 to ExpressionFactory in Cayenne 3.0.1 (which will hopefully be released in a week or two. To get this feature you can either do a build from 3.0-STABLE branch [1] or wait, or use EJBQLQuery that already supports it in 3.0.
Cheers, Andrus [1] https://svn.apache.org/repos/asf/cayenne/main/branches/STABLE-3.0/ On Aug 25, 2010, at 4:21 PM, Michael Gentry wrote: > 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 > <v.antonov...@gmail.com> 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. >> >