Re: ParseException in EJBQL statement with upper function

2010-01-20 Thread Andrey Razumovsky
Looks like a bug, could you please report it? In the meanwhile, this can be used: SELECT count(t) FROM User t WHERE (upper(t.email) LIKE '%andreas.hartm...@gmail.com%') OR (upper(t.email) LIKE '%no...@macbay.de%') 2010/1/20 Andreas Hartmann > Hi everyone, > > I'm taking my first steps with EJB

Re: Create count(*) query based on SelectQuery

2010-01-20 Thread Andrey Razumovsky
Here's and (old) version of my CountHelper class that automatically creates COUNT statements for SelectQuery. I used to do same for EJBQL, but that was much harder. http://osdir.com/ml/user-cayenne-apache/2009-09/msg00012.html 2010/1/20 Andreas Hartmann > Hi everyone, > > I'm mainly using Select

Re: Create count(*) query based on SelectQuery

2010-01-20 Thread Andreas Hartmann
Hi Andrus, Am 20.01.10 17:22, schrieb Andrus Adamchik: Short of writing custom extensions of SelectQuery, yes, EJBQL or SQLTemplate is the answer. We are designing a combined SelectQuery / EJBQLQuery that can be created either via String or using API as a part of 3.1, but in 3.0 this is not an

ParseException in EJBQL statement with upper function

2010-01-20 Thread Andreas Hartmann
Hi everyone, I'm taking my first steps with EJBQL. Can someone spot the error in the following statement? SELECT count(t) FROM User t WHERE (upper(t.email) LIKE upper('%andreas.hartm...@gmail.com%')) OR (upper(t.email) LIKE upper('%no...@macbay.de%')) The exception is: Caused by: org.apache.

Re: Create count(*) query based on SelectQuery

2010-01-20 Thread Andrus Adamchik
Short of writing custom extensions of SelectQuery, yes, EJBQL or SQLTemplate is the answer. We are designing a combined SelectQuery / EJBQLQuery that can be created either via String or using API as a part of 3.1, but in 3.0 this is not an option. Andrus On Jan 20, 2010, at 6:10 PM, Andr

Create count(*) query based on SelectQuery

2010-01-20 Thread Andreas Hartmann
Hi everyone, I'm mainly using SelectQuery queries, built using quite a complex programmatic infrastructure. But now I have the requirement to obtain the total number of rows (to set the Content-Range header in a REST service). So basically I have a SelectQuery which does SELECT … FROM foo

Re: Project site links

2010-01-20 Thread Andrus Adamchik
Thanks for bringing it up. We are working on it (see discussion on d...@cayenne.a.o ). Andrus On Jan 20, 2010, at 1:14 PM, Borut Bolčina wrote: Hello, what happened to some of the links at http://cayenne.apache.org/ ? I want to access 3.0 JavaDoc from the menu and the resulting url ( http:/

Project site links

2010-01-20 Thread Borut Bolčina
Hello, what happened to some of the links at http://cayenne.apache.org/ ? I want to access 3.0 JavaDoc from the menu and the resulting url ( http://cayenne.apache.org/doc/api/index.html) is showing me the 3.1-SNAPSHOT javadoc. There should definitely be a 3.0 API link somewhere on the main page!