Skip to content

Commit

Permalink
fix(engine): cannot use distinct with CLOB columns in db2 / oracle
Browse files Browse the repository at this point in the history
related to #CAM-6014
  • Loading branch information
meyerdan committed May 17, 2016
1 parent f5920d4 commit e084c3e
Showing 1 changed file with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,25 @@
</select>

<select id="selectFilterByQueryCriteria" parameterType="org.camunda.bpm.engine.impl.filter.FilterQueryImpl" resultMap="filterResultMap">
<!--
SEE: https://app.camunda.com/jira/browse/CAM-6014
-->
<include refid="org.camunda.bpm.engine.impl.persistence.entity.Commons.bindOrderBy"/>
${limitBefore}
select distinct RES.*
${limitBetweenClob}
<include refid="selectFilterByQueryCriteriaSql" />
${orderBy}
${limitAfter}
SELECT RES.*, J.QUERY_, J.PROPERTIES_ FROM (
${limitBefore}
select distinct RES.ID_, RES.REV_, RES.RESOURCE_TYPE_, RES.NAME_, RES.OWNER_
${limitBetweenClob}
<include refid="selectFilterByQueryCriteriaSql" />
${orderBy}
${limitAfter}
) RES
INNER JOIN ${prefix}ACT_RU_FILTER J ON RES.ID_ = J.ID_
<if test="orderingProperties.size() > 0">
ORDER BY
<foreach item="orderingProperty" index="index" collection="orderingProperties" separator=",">
${@org.camunda.bpm.engine.impl.db.sql.MybatisJoinHelper@orderBy(orderingProperty, index)}
</foreach>
</if>
</select>

<select id="selectFilterByQueryCriteria_postgres" parameterType="org.camunda.bpm.engine.impl.filter.FilterQueryImpl" resultMap="filterResultMap_postgres">
Expand Down

0 comments on commit e084c3e

Please sign in to comment.