문제

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