0 Replies Latest reply on Jan 11, 2005 10:33 AM by hermenj

    Problems using JBoss QL and @jboss.query XDoclet-Tag

    hermenj

      Hi!

      First of all thanks for the JBoss-IDE Plugin, it does great work and makes things much easier for me.

      I tried to build a finder Method using JBOSS QL by using XDoclet-Tags, but it doesn't work as is should be.

      I defined the finder Method using @jboss.query and @ejb.finder as followed:
      ------- snip ----------
      * @ejb.finder
      * description="return all Books that match 'name'"
      * signature="java.util.Collection findByTitle(java.lang.String name)"
      *
      * @jboss.query
      * signature="java.util.Collection findByTitle(java.lang.String name)"
      * query="SELECT DISTINCT OBJECT(o) FROM Book AS o WHERE UCASE(o.title) LIKE UCASE(?1) LIMIT 20"
      *
      ------- snap ---------

      the problem is, that if i don't define the @ejb.finder "query" property, as it is reconomed in the documentation for JBoss QL, no "findByTitle" method is generated in my deployment descriptor. if i define a "query" property in the @ejb.finder, its query is used by the method, but not the one written in the @jboss.query.

      It works, if i delete the @ejb.finder "query" property in the generated deployment descritor, but i have to do this every time i generate them from my XDoclet tags.

      Does anyone knows a solution for this Problem?

      Thanks for help!

      Johannes