4 Replies Latest reply on Apr 24, 2003 3:50 PM by Frank Langelage

    EJB-QL and LIKE operator

    Martin Stepanek Newbie

      Hi,

      I try to use JBoss 3.0.0 alpha with CMP2.0. It looks fine, but I have a little problem with LIKE operator. It works well when I use static string for comparison, but when I want to use parameter, then it doesn't work.

      SELECT OBJECT(t) FROM InfoText t WHERE t.text LIKE '?1'
      -- this query doesn't replace the parameter symbol with actual value

      SELECT OBJECT(t) FROM InfoText t WHERE t.text LIKE ?1
      -- this query doesn't recognise the WHERE clause at all and performs SELECT OBJECT(t) FROM InfoText t

      Is there something wrong with my EJB-QL queries? Or is it a bug?

      Thanx
      Martin