Question

I am attempting to return a single object via castor query that has the earliest date.

This is the sort of thing I have been trying: SELECT p FROM model.objects.Product p LIMIT $1 WHERE p.status=$2 ORDER BY p.statusDate;

This results in: org.exolab.castor.jdo.oql.OQLSyntaxException: An incorrect token type was found near WHERE (found KEYWORD_WHERE, but expected END_OF_QUERY

I am using version 0.9.6 which I believe supports this kind of thing.

Any hints or pointers much appreciated.

Was it helpful?

Solution

As per my comment, it indeed appears that the LIMIT clause must appear after the ORDER BY clause. See the Castor query syntax.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top