AnsweredAssumed Answered

problem with ...Like('pattern') methods

Question asked by ankits on May 13, 2013
Latest reply on May 16, 2013 by ankits
I want to search for the task names using some pattern. but the method taskNameLike("taskName") does not return the result based on the pattern provided. I can see in the HistoricTaskInstance.xml file the query as:

<sql id="selectHistoricTaskInstancesByQueryCriteriaSql">
    from ${prefix}ACT_HI_TASKINST RES
    <if test="processFinished || processUnfinished">
          inner join ${prefix}ACT_HI_PROCINST HPI ON RES.PROC_INST_ID_ = HPI.ID_
    </if>
    <if test="processDefinitionKey != null || processDefinitionName != null">
      inner join ${prefix}ACT_RE_PROCDEF D on RES.PROC_DEF_ID_ = D.ID_
    </if>
    <where>
      .
      .
      .
        <if test="taskNameLike != null">
                and RES.NAME_ like #{taskNameLike}
        </if>
      .
      .
   </where>
</sql>
but in above query no pattern matching characters are used. If it cannot search based on given pattern, what is the point in using <strong>like</strong> operator here.

Outcomes