Hello,
I tried to set the search criteria both candidate User & candidate Group.
It occurs an error with this message.
(Invalid query usage: cannot set both candidateUser and candidateGroup)
But in Task.xml, the code was designed by using ‘OR’, not ‘AND’ between candidate User & candidate Group.
Please let me know what this code means.
Thank you.
(Task.xml)
< if test=“candidateUser != null || candidateGroups != null”>
< if test=“!includeAssignedTasks”>
and RES.ASSIGNEE_ is null
< /if>
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>