3 Replies Latest reply on Mar 10, 2004 1:50 AM by Stefan Schmidt

    very simple findBy -> sql exception

    Martin Newbie

      hi all,

      we're running 3.2.1 and found a problem (which can't be a bug, 'cause if it would be eqbql would be totally useless :-) ):

      the query (xdoclet):

       * @ejb.finder
       * result-type-mapping = "Local"
       * signature = "java.lang.Object findByLogin(java.lang.String arg0)"
       * query = "SELECT OBJECT(u) FROM User u WHERE u.login = ?1"
       * view-type = "local"
      


      at deployment time the query seems to compile (no error) but when using it the result is the following:

      [LoginManagerSessionEJB] Find failed: java.sql.SQLException: Unexpected token: FROM in statement [SELECT FROM USER t0_u WHERE t0_u.LOGIN = 'testuser']

      it seems that OBJECT(u) does not make it's way into the sql statement.

      database is hsqldb.

      thanks in advance,
      verence