This content has been marked as final.
Show 1 reply
-
1. Re: findAll method with more than 1000 records
henk Jul 20, 2004 11:08 AM (in response to chalupas)Hi,
you can do this by using Jboss specific sql.
in your jbosscmp-jdbc.xml file, you can add something like :
<query-method>
<method-name>findAllLtd</method-name>
<method-params>
<method-param>int</method-param>
</method-params>
</query-method>
<jboss-ql><![CDATA[SELECT OBJECT(a) FROM table as a LIMIT ?1]]></jboss-ql>
This is nicely documented in the free online documentation.
Be aware that this overrides a method in your ejb-jar.xml ! So you must also have a query in your ejb-jar.xml file, but this one will be overriden by the query in your jbosscmp-jdbc.xml file.
Henk