Hi, I need help to write query method for my portlet. I need find last record. I write next:
<query-method>
<method-name>findLast</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql>select object(o) from Orders o where o.id=(select max(b.id) from Orders b)</ejb-ql>
But it does not work. How it will be correct? ))