0 Replies Latest reply on Oct 23, 2001 2:27 PM by Paulos Segaro

    Aggregators

    Paulos Segaro Newbie

      Is it possible to make a custom finder for a cpm entitiy bean in JBoss with a query which will select the maximum value of a column specified?

      For example If I have a field in ejb-jar.xml.
      <cmp-field><field-name>Amount</field-name></cmp-field>

      could I create a finder in jaws.xml as described below


      findMaxAmount
      select max(Amount) from table_name

      <read-ahead>true</read-ahead>


      If not how could I do it. I am looking for a better solution than using finAll() and sorting later to find the maximum "Amount".

      Thanks in advance for your responses.

      Paulos Segaro