I try to use last() in a query.

But I have the following exception:
javax.ejb.EJBException: Transaction failed due to Exception: An incorrect token type 
was found near last (2, need 1
....

My query is : "last( select p from Product p where p.id > $1 )"


Where is the problem? 
Castor documentation says: 
query                   ::= selectExpr
                            | expr

collectionExpr          ::= first( query )
                            | last( query )
                            | unique( query )
                            | exists( query )


Please, I know it looks like a stupid question ,I think  it would take you very short 
time to answer me, can you unblock me?

Thanks in advance.

PS: I try to optimize a long request.

J.

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to