Hi,I tried select all task by candidateUser or candidateGroups in TaskQuerytaskService.createTaskQuery().taskCandidateGroupIn(roleNames).taskCandidateUser(user.getUsername()).orderByDueDate().asc().list();
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'
and
(
<if test="candidateUser != null">
I.USER_ID_ = #{candidateUser}
</if>
<if test="candidateUser != null && candidateGroups != null && candidateGroups.size() > 0">
or
</if>
<if test="candidateGroups != null && candidateGroups.size() > 0">
I.GROUP_ID_ IN
<foreach item="group" index="index" collection="candidateGroups"
open="(" separator="," close=")">
#{group}
</foreach>
</if>
)
</if>
The mapping allows both candidateUser or candidateGroups at the same time.And I need taht query!!