2 Replies Latest reply on Jul 17, 2004 7:05 PM by John Shepherd

    EJB query language:- problem using 'LIKE'

    John Shepherd Newbie


      I am writing my first entity bean using CMP.
      I have a problem using the 'LIKE' operator in an EJB query.
      I've not had any problems using the "=" operator.

      The error I get on deployment is:

      >Error compiling EJB-QL statement 'SELECT OBJECT(c) >FROM Contract c
      > WHERE c.lastName LIKE ?1'; - nested throwable: >(org.jboss.ejb.plugins.cmp.ejbql.ParseException: >Encountered "1" at line 2, column 35.
      >Was expecting:
      > <STRING_LITERAL> ...

      The section from my ejb-jar is:

      SELECT OBJECT(c) FROM Contract c
      WHERE c.lastName LIKE ?1

      Any help is much appreciated.