AnsweredAssumed Answered

Select tasks by candidateUser or candidateGroups

Question asked by fersmi on Sep 18, 2012
Latest reply on May 19, 2017 by haja
I tried select all task by candidateUser or candidateGroups in TaskQuery
but I got
ActivitiException - Invalid query usage: cannot set both candidateUser and candidateGroupIn

My question is: If this select is not allowed why in iBatis query mapping is this:

    <if test="candidateUser != null || candidateGroups != null">
        and T.ASSIGNEE_ is null
        and I.TYPE_ = 'candidate'
          <if test="candidateUser != null">
            I.USER_ID_ = #{candidateUser}         
          <if test="candidateUser != null &amp;&amp; candidateGroups != null &amp;&amp; candidateGroups.size() &gt; 0">
          <if test="candidateGroups != null &amp;&amp; candidateGroups.size() &gt; 0">
            I.GROUP_ID_ IN
            <foreach item="group" index="index" collection="candidateGroups"
                     open="(" separator="," close=")">

The mapping allows both candidateUser or candidateGroups at the same time.

And I need taht query!!