Skip to content

Commit

Permalink
Use safe ids when querying process and case definitions by ids
Browse files Browse the repository at this point in the history
  • Loading branch information
filiphr committed Oct 29, 2024
1 parent 8f94c40 commit 9170a8b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,10 @@ public Set<String> getIds() {
return ids;
}

public List<List<String>> getSafeIds() {
return getSafeList(ids);
}

public String getName() {
return name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,14 @@
RES.ID_ = #{id, jdbcType=VARCHAR}
</if>
<if test="ids != null and ids">
and RES.ID_ in
<foreach item="id" index="index" collection="ids" open="(" separator="," close=")">
#{id, jdbcType=VARCHAR}
</foreach>
and (
<foreach item="listItem" collection="safeIds" separator="OR">
RES.ID_ in
<foreach item="id" collection="listItem" open="(" separator="," close=")">
#{id, jdbcType=VARCHAR}
</foreach>
</foreach>
)
</if>
<if test="category != null">
and RES.CATEGORY_ = #{category, jdbcType=VARCHAR}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,10 @@ public Set<String> getIds() {
return ids;
}

public List<List<String>> getSafeIds() {
return getSafeList(ids);
}

public String getName() {
return name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,14 @@
RES.ID_ = #{id, jdbcType=NVARCHAR}
</if>
<if test="ids != null and ids">
and RES.ID_ in
<foreach item="id" index="index" collection="ids" open="(" separator="," close=")">
#{id, jdbcType=NVARCHAR}
</foreach>
and (
<foreach item="listItem" collection="safeIds" separator="OR">
RES.ID_ in
<foreach item="id" collection="listItem" open="(" separator="," close=")">
#{id, jdbcType=NVARCHAR}
</foreach>
</foreach>
)
</if>
<if test="category != null">
and RES.CATEGORY_ = #{category, jdbcType=NVARCHAR}
Expand Down

0 comments on commit 9170a8b

Please sign in to comment.