cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Lamy <davel...@gmail.com>
Subject Re: ParseException with EJBQL expression
Date Mon, 21 Dec 2009 15:59:05 GMT
Thanks Andrey-- good to know.  Might be worth a minor JIRA to fix the
Expression.toEJBQL() to correctly produce this notation instead of
likeIgnoreCase.

Dave

On Thu, Dec 17, 2009 at 6:16 AM, Andrey Razumovsky <
razumovsky.andrey@gmail.com> wrote:

> anwsering my own question : "upper" can be used, but the keyword *must* be
> in lower case
>
> 2009/12/17 Andrey Razumovsky <razumovsky.andrey@gmail.com>
>
> > So likeIgnoreCase in not supported at all? Is there some workaround?
> >
> > 2009/12/4 Andrus Adamchik <andrus@objectstyle.org>
> >
> > "likeIgnoreCase" is not valid in EJBQL. Although the error message refers
> >> to something else... strange...
> >>
> >>
> >>
> >> On Dec 4, 2009, at 4:12 AM, Dave Lamy wrote:
> >>
> >>  Hey guys--
> >>>
> >>> I'm really just now getting into using the EJBQLQuery and am having
> some
> >>> difficulties.  I don't know whether I'm doing something fundamentally
> >>> wrong
> >>> or what.
> >>>
> >>> Here's my EJBQL expression that I'm trying to get parsed (running
> 3.0B1):
> >>>
> >>> select COUNT(foo) from ProductCollection foo where
> >>> foo.productStyles.taxonomy likeIgnoreCase '323.%'
> >>>
> >>> Parsing this query yields the following exception:
> >>>
> >>>
> >>> org.apache.cayenne.ejbql.parser.ParseException: Encountered "
> >>> <IDENTIFIER>
> >>> "foo "" at line 1, column 53.
> >>> Was expecting:
> >>>   "(" ...
> >>>
> >>>   at
> >>>
> >>>
> org.apache.cayenne.ejbql.parser.EJBQL.generateParseException(EJBQL.java:9419)
> >>>   at
> >>> org.apache.cayenne.ejbql.parser.EJBQL.jj_consume_token(EJBQL.java:9298)
> >>>   at
> >>>
> >>>
> org.apache.cayenne.ejbql.parser.EJBQL.conditional_primary(EJBQL.java:1933)
> >>>   at
> >>>
> org.apache.cayenne.ejbql.parser.EJBQL.conditional_factor(EJBQL.java:1911)
> >>>   at
> >>> org.apache.cayenne.ejbql.parser.EJBQL.conditional_term(EJBQL.java:1776)
> >>>   at
> >>>
> >>>
> org.apache.cayenne.ejbql.parser.EJBQL.conditional_expression(EJBQL.java:1738)
> >>>   at
> >>>
> >>>
> org.apache.cayenne.ejbql.parser.EJBQL.conditional_primary(EJBQL.java:1928)
> >>>   at
> >>>
> org.apache.cayenne.ejbql.parser.EJBQL.conditional_factor(EJBQL.java:1911)
> >>>   at
> >>> org.apache.cayenne.ejbql.parser.EJBQL.conditional_term(EJBQL.java:1776)
> >>>   at
> >>>
> >>>
> org.apache.cayenne.ejbql.parser.EJBQL.conditional_expression(EJBQL.java:1738)
> >>>   at
> org.apache.cayenne.ejbql.parser.EJBQL.where_clause(EJBQL.java:1585)
> >>>   at
> >>> org.apache.cayenne.ejbql.parser.EJBQL.select_statement(EJBQL.java:69)
> >>>   at org.apache.cayenne.ejbql.parser.EJBQL.parseQuery(EJBQL.java:41)
> >>> ...
> >>>
> >>> The statement looks legit to me.  Is there like a fundamental something
> >>> I'm
> >>> not understanding about EJBQL?  I saw some docs that showed doing this
> >>> sort
> >>> of join alias "IN" thing,
> >>>
> >>> SELECT OBJECT(e) FROM Department d, IN(d.employees) e
> >>>   WHERE d.name = ?1 AND e.salary > ?2
> >>>
> >>> My problem is that I'm using Expression.toEJBQL() to gen the where
> >>> clause..
> >>> was hoping to not have to recreate my code that generates the
> Expression
> >>> object.
> >>>
> >>> Help!
> >>>
> >>> Dave
> >>>
> >>
> >>
> >
> >
> > --
> > Andrey
> >
>
>
>
> --
> Andrey
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message