6 Replies Latest reply on Aug 27, 2003 12:12 PM by Kayvan Mojarrad

    using character literals in WHERE clause

    Justin Akehurst Newbie

      We are porting ejb-ql that works under Resin CMP over to JBoss 3.2.x, and ran into this snag.

      compiling JBossQL statement 'select object(o) from v_content o,
      IN(o.contract.phoneContractList) as phoneContract, IN(o.categoryList)
      as category where now() > phoneContract.contract.startDate and now() <
      phoneContract.contract.endDate and o.approvalCode = 'a' and
      phoneContract.phone.phoneId = ?1 and (
      lcase(o.imageContent.description) like ?2 or
      lcase(o.imageContent.notes) like ?2 or
      lcase(o.imageContent.file.userFriendlyFilename) like ?2 or
      lcase(category.name) like ?2 or lcase(o.keywords) like ?2) order by
      o.contentId DESC'; - nested throwable:
      (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "\'a\'" at
      line 1, column 229.
      Was expecting one of:
      "ABS" ...
      "LENGTH" ...
      "LOCATE" ...
      "SQRT" ...
      "(" ...
      "+" ...
      "-" ...
      <INTEGER_LITERAL> ...
      <FLOATING_POINT_LITERAL> ...
      <NUMERIC_VALUED_PARAMETER> ...
      <NUMERIC_VALUED_PATH> ...
      )]

      Is there a way to specify a char for a comparison against java.lang.Character in ejb-ql?