Pregunta

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.

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top