0 Replies Latest reply on Jan 6, 2005 10:48 AM by Anil Saldanha

    Frequently Asked Questions

    Anil Saldanha Master

      Hello,

      I was happy using just EJB-QL until I wanted to have a finder method that used both an "ORDER BY" and "LIMIT" in the query. Aparently it is not supported yet.
      That is when I found out about the JBoss-QL. As we are using XDoclet to generate our EJBs, I tried using the @jboss.finder-query but XDoclet does not seem to generate the query. After roaming a bit on the web, it seems to be a known bug of XDoclet, or am I mistaken?
      Here is the code:

      * @ejb.finder
      * signature="java.util.Collection findAllResultsByUserIdAndWwuid(com.mypath.ejb.interfaces.DudeLocal user, java.lang.String environmentObjectId, java.lang.Integer limit)"
      * result-type-mapping="Local"
      * method-intf="LocalHome"
      *
      * @jboss.finder-query
      * name=findAllResultsByUserIdAndWwuid
      * query="SELECT DISTINCT OBJECT(o) FROM ExerciseResult o WHERE o.user=?1 AND o.environmentObject.wwuid = ?2"
      * order="lastChangedDate DESC"
      *
      * @jboss.declared-sql
      * signature="java.util.Collection findAllResultsByUserIdAndWwuid(com.credm.babel.ejb.interfaces.UserLocal user, java.lang.String environmentObjectId)"
      * other=" LIMIT ?3"
      *

      At deployment time, JBoss complains the ejb-finder should have a tag. Did anyone encounter the same problem?

      Thanks!

      Paul