0 Replies Latest reply on Feb 17, 2003 8:14 AM by Paulo Jeronimo

    Problems with generated SQL for finder method

    Paulo Jeronimo Newbie

      I'm using JBoss3.0.6, and XDoclet1.2b2.
      I created a finder method for my table "SERVICOS_CENTRAIS_TELEFONICAS" on Oracle8 with the folowing XDoclet definition:

      * @ejb.finder
      * signature="java.util.Collection findByIdClasseServico(int idClasseServico)"
      * result-type-mapping="Local"
      * method-intf="LocalHome"
      * query="SELECT OBJECT(o) FROM Servico o WHERE o.idClasseServico = ?1"

      The problem is that the SQL generated for this finder method is wrong! The table name on SQL clause is wrong.

      This is the log:

      2003-02-17 09:58:37,698 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Servico.findByIdClasseServico] EJB-QL: SELECT OBJECT(o) FROM Servico o WHERE o.idClasseServico = ?1
      2003-02-17 09:58:37,702 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.Servico.findByIdClasseServico] SQL: SELECT t0_o.SCTE_CODIGO_SERVICO FROM MASC.SERVICOS_CENTRAIS_LYYFSN t0_o WHERE t0_o.SCTE_CSER_CODIGO = ?

      Any sugestions?