1 Reply Latest reply on Feb 13, 2003 7:05 AM by Pontus Jonsson

    "Locate" EJBQL in PostgreSQL

    james Newbie


      I spent a lot of time in searching way to make "LIkE" work
      The most easy way is using "LOCATE" then "LIKE"
      (I want to know which version of JBOSS will support this?)

      Any way,
      The JBOSS support for postgresql in "LOCATE" won't work
      I found it use a bad long query,
      instead I use the following way to do this

      <function-mapping>
      <function-name>locate</function-name>
      <function-sql>position(?2 in ?1)</function-sql>
      </function-mapping>

      The postgresql provide position,
      I could'nt understand why jboss use such a long,
      and non woring query?

      So,anyone have the same problem can refer to my solution
      Once more,I hope JBOSS team can replace "LOCATE" function
      in Postgresq with my little opinion..

      James