Skip to content

Commit

Permalink
fix(engine): re-introduce postgresql result map
Browse files Browse the repository at this point in the history
was necessary after all :)

related to #CAM-6093
  • Loading branch information
meyerdan committed May 25, 2016
1 parent f51ed50 commit 72dc9d7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ public class DbSqlSessionFactory implements SessionFactory {
addDatabaseSpecificStatement(POSTGRES, "selectCommentByTaskIdAndCommentId", "selectCommentByTaskIdAndCommentId_postgres");
addDatabaseSpecificStatement(POSTGRES, "selectEventsByTaskId", "selectEventsByTaskId_postgres");
addDatabaseSpecificStatement(POSTGRES, "selectHistoricVariableInstanceByQueryCriteria", "selectHistoricVariableInstanceByQueryCriteria_postgres");
addDatabaseSpecificStatement(POSTGRES, "selectFilterByQueryCriteria", "selectFilterByQueryCriteria_postgres");
addDatabaseSpecificStatement(POSTGRES, "selectFilter", "selectFilter_postgres");

constants = new HashMap<String, String>();
constants.put("constant.event", "'event'");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,25 @@
<result property="propertiesInternal" column="PROPERTIES_" jdbcType="CLOB" />
</resultMap>

<resultMap id="filterResultMap_postgres" type="org.camunda.bpm.engine.impl.persistence.entity.FilterEntity">
<id property="id" column="ID_" jdbcType="VARCHAR" />
<result property="revision" column="REV_" jdbcType="INTEGER" />
<result property="resourceType" column="RESOURCE_TYPE_" jdbcType="VARCHAR" />
<result property="name" column="NAME_" jdbcType="VARCHAR" />
<result property="owner" column="OWNER_" jdbcType="VARCHAR" />
<result property="queryInternal" column="QUERY_" jdbcType="BINARY" />
<result property="propertiesInternal" column="PROPERTIES_" jdbcType="BINARY" />
</resultMap>

<!-- FILTER SELECT -->

<select id="selectFilter" parameterType="string" resultMap="filterResultMap">
select * from ${prefix}ACT_RU_FILTER where ID_ = #{id, jdbcType=VARCHAR}
</select>

<select id="selectFilter_postgres" parameterType="string" resultMap="filterResultMap_postgres">
select * from ${prefix}ACT_RU_FILTER where ID_ = #{id, jdbcType=VARCHAR}
</select>

<select id="selectFilterByQueryCriteria" parameterType="org.camunda.bpm.engine.impl.filter.FilterQueryImpl" resultMap="filterResultMap">
<include refid="org.camunda.bpm.engine.impl.persistence.entity.Commons.bindOrderBy"/>
Expand All @@ -81,7 +95,17 @@
${orderBy}
${limitAfter}
</select>


<select id="selectFilterByQueryCriteria_postgres" parameterType="org.camunda.bpm.engine.impl.filter.FilterQueryImpl" resultMap="filterResultMap_postgres">
<include refid="org.camunda.bpm.engine.impl.persistence.entity.Commons.bindOrderBy"/>
${limitBefore}
select ${distinct} RES.*
${limitBetween}
<include refid="selectFilterByQueryCriteriaSql" />
${orderBy}
${limitAfter}
</select>

<select id="selectFilterByQueryCriteria_oracleDb2" parameterType="org.camunda.bpm.engine.impl.filter.FilterQueryImpl" resultMap="filterResultMap">
<!--
SEE: https://app.camunda.com/jira/browse/CAM-6014
Expand Down

0 comments on commit 72dc9d7

Please sign in to comment.