質問

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.

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top