0 Replies Latest reply on Mar 9, 2003 10:09 AM by Uri

    Problem with read-ahead settings for findByPrimaryKey

    Uri Newbie

      When trying to configure the following read-ahead settings for one of my entity beans, i get an exception that the method doesn't exist. Is it a JBoss bug or forbidden on purpose?


      <query-method>
      <method-name>findByPrimaryKey</method-name>
      <method-params>
      <method-param>java.lang.Integer</method-param>
      </method-params>
      </query-method>
      <read-ahead>
      on-find
      <page-size>1</page-size>
      <eager-load-group>All</eager-load-group>
      </read-ahead>


      The exception I get in deployment:

      Unknown query method : public abstract com.mycompany.TaskLocal com.mycompany.TaskLocalHome.findByPrimaryKey(java.lang.Integer) throws javax.ejb.FinderException
      ...

      I tried to work around this by defining the above settings for the entire bean, and then override the settings for each custom query, but the problem is that the eager load group of the entire bean gets loaded anyway, on the ejbLoad of the bean. The strategy for the entire bean is on-find.
      Help would be appriciated