Implicit parameters need to be prefixed with a ':'

query.setFilter("dueDate >= :beginDateParam && dueDate <= :endDateParam");

Max
On Tue, Jan 5, 2010 at 10:53 AM, dantuluri <[email protected]> wrote:

> Hi,
>
>     I have the following query with inequality operators on a single
> property:
>
> query = pm.newQuery(File.class);
> query.setFilter("dueDate >= beginDateParam && dueDate <=
> endDateParam");
> List<File> storedFiles = (List<File>)query.executeWithArray(begin,
> end);
>
> Runtime is throwing this exception:
> java.lang.RuntimeException:
> org.datanucleus.store.appengine.query.DatastoreQuery
> $UnsupportedDatastoreFeatureException: Problem with query <SELECT FROM
> Flow WHERE dueDate >= beginDateParam && dueDate <= endDateParam>:
> Operator  >=  cannot be used as part of the join condition.  Use
> 'contains' if joining on a Collection field and equality if joining on
> a single-value field.
>
> AppEngine documentation clearly says it supports inequality operators
> on a single property. Following is the quote from the documentation:
>
> Inequality Filters Are Allowed On One Property Only
> A query may only use inequality filters (<, <=, >=, >, !=) on one
> property across all of its filters.
> For example, this query is allowed:
> select from Person where birthYear >= minBirthYearParam
>                      && birthYear <= maxBirthYearParam
>
> Can anyone with App Engine experience please explain whats wrong with
> this query?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>
>
>
--
You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to