AnsweredAssumed Answered

CategoryLike Query Is Not Filtering Results

Question asked by nfox241 on Jul 21, 2011
Latest reply on Jul 22, 2011 by nfox241
All process definitions are being pulled back from the database when calling


repositoryService.createProcessDefinitionQuery().processDefinitionCategoryLike(..)

It appears the query is being build from the 'selectProcessDefinitionsByQueryCriteriaSql' definition in the ProcessDefinition.xml file:


<sql id="selectProcessDefinitionsByQueryCriteriaSql"> 
    from ACT_RE_PROCDEF PD
    <where>
      <if test="id != null">
        PD.ID_ = #{id}
      </if>
      <if test="category != null">
        PD.CATEGORY_ = #{category}
      </if>
      <if test="name != null">
        PD.NAME_ = #{name}
      </if>
      <if test="nameLike != null">
        PD.NAME_ like #{nameLike}
      </if>
      <if test="key != null">
        and PD.KEY_ = #{key}
      </if>
      <if test="keyLike != null">
        and PD.KEY_ like #{keyLike}
      </if>
      <if test="resourceName != null">
        and PD.RESOURCE_NAME_ = #{resourceName}
      </if>
      <if test="resourceNameLike != null">
        and PD.RESOURCE_NAME_ like #{resourceNameLike}
      </if>
      <if test="version != null">
        and PD.VERSION_ = #{version}
      </if>
      <if test="deploymentId != null">
        and PD.DEPLOYMENT_ID_ = #{deploymentId}
      </if>
      <if test="latest">
        and PD.VERSION_ = (select max(VERSION_) from ACT_RE_PROCDEF where KEY_ = PD.KEY_)
      </if>
    </where>
  </sql>

A test for categoryLike seems to be missing. 

I'm using activiti-5.6, and I wanted to make sure I wasn't missing something before creating a jira issue.

Thanks.

Outcomes