File tree Expand file tree Collapse file tree
flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/mapping/entity
flowable-engine/src/main/resources/org/flowable/db/mapping/entity Expand file tree Collapse file tree Original file line number Diff line number Diff line change 316316 CASE_DEF.VERSION_ as CaseDefinitionVersion,
317317 CASE_DEF.DEPLOYMENT_ID_ as CaseDefinitionDeploymentId
318318 from ${prefix}ACT_CMMN_RU_CASE_INST RES
319- <!-- Doing an inner join on the definition table is OK, since it is a 1 :1 relationship -->
319+ <!-- Doing an inner join on the definition table is OK. It is an N :1 relationship -->
320320 inner join ${prefix}ACT_CMMN_CASEDEF CASE_DEF on RES.CASE_DEF_ID_ = CASE_DEF.ID_
321321 <include refid =" commonSelectCaseInstancesByQueryCriteriaSql" />
322322 ${orderBy}
325325
326326 <select id =" selectCaseInstanceCountByQueryCriteria" parameterType =" org.flowable.cmmn.engine.impl.runtime.CaseInstanceQueryImpl" resultType =" long" >
327327 select count(distinct RES.ID_) from ${prefix}ACT_CMMN_RU_CASE_INST RES
328- <!-- Doing an inner join on the definition table is OK, since it is a 1 :1 relationship -->
328+ <!-- Doing an inner join on the definition table is OK. It is an N :1 relationship -->
329329 inner join ${prefix}ACT_CMMN_CASEDEF CASE_DEF on RES.CASE_DEF_ID_ = CASE_DEF.ID_
330330 <include refid =" commonSelectCaseInstancesByQueryCriteriaSql" />
331331 </select >
369369
370370 <sql id =" selectCaseInstancesWithVariablesByQueryCriteriaSql" >
371371 from ${prefix}ACT_CMMN_RU_CASE_INST RES
372- <!-- Doing an inner join on the definition table is OK, since it is a 1 :1 relationship -->
372+ <!-- Doing an inner join on the definition table is OK. It is an N :1 relationship -->
373373 inner join ${prefix}ACT_CMMN_CASEDEF CASE_DEF on RES.CASE_DEF_ID_ = CASE_DEF.ID_
374374 <include refid =" commonSelectCaseInstancesByQueryCriteriaSql" />
375375 </sql >
Original file line number Diff line number Diff line change 338338 <sql id =" selectHistoricCaseInstancesWithVariablesByQueryCriteriaSql" >
339339 from ${prefix}ACT_CMMN_HI_CASE_INST RES
340340 <!--
341- Doing a join on the definition table is OK, since it is a 1 :1 relationship.
341+ Doing a join on the definition table is OK, since it is an N :1 relationship.
342342 This has to be an outer join because historic data might exists, but definitions might have been deleted
343343 -->
344344 left outer join ${prefix}ACT_CMMN_CASEDEF CASE_DEF on RES.CASE_DEF_ID_ = CASE_DEF.ID_
348348 <sql id =" selectHistoricCaseInstancesByQueryCriteriaSql" >
349349 from ${prefix}ACT_CMMN_HI_CASE_INST RES
350350 <!--
351- Doing a join on the definition table is OK, since it is a 1 :1 relationship.
351+ Doing a join on the definition table is OK, since it is an N :1 relationship.
352352 This has to be an outer join because historic data might exists, but definitions might have been deleted
353353 -->
354354 left outer join ${prefix}ACT_CMMN_CASEDEF CASE_DEF on RES.CASE_DEF_ID_ = CASE_DEF.ID_
Original file line number Diff line number Diff line change 655655
656656 <sql id =" selectExecutionsByQueryCriteriaSql" >
657657 from ${prefix}ACT_RU_EXECUTION RES
658- <!-- Doing an inner join on the definition table is OK, since it is a 1 :1 relationship -->
658+ <!-- Doing an inner join on the definition table is OK. It is an N :1 relationship -->
659659 inner join ${prefix}ACT_RE_PROCDEF P on RES.PROC_DEF_ID_ = P.ID_
660660 <include refid =" commonSelectExecutionsByQueryCriteriaSql" />
661661 </sql >
693693
694694 <sql id =" selectProcessInstanceWithVariablesByQueryCriteriaSql" >
695695 from ${prefix}ACT_RU_EXECUTION RES
696- <!-- Doing an inner join on the definition table is OK, since it is a 1 :1 relationship -->
696+ <!-- Doing an inner join on the definition table is OK. It is an N :1 relationship -->
697697 inner join ${prefix}ACT_RE_PROCDEF P on RES.PROC_DEF_ID_ = P.ID_
698698 <include refid =" commonSelectExecutionsByQueryCriteriaSql" />
699699 </sql >
Original file line number Diff line number Diff line change 449449 <sql id =" selectHistoricProcessInstancesByQueryCriteriaSql" >
450450 from ${prefix}ACT_HI_PROCINST RES
451451 <!--
452- Doing a join on the definition table is OK, since it is a 1 :1 relationship.
452+ Doing a join on the definition table is OK, since it is an N :1 relationship.
453453 This has to be an outer join because historic data might exists, but definitions might have been deleted
454454 -->
455455 left outer join ${prefix}ACT_RE_PROCDEF DEF on RES.PROC_DEF_ID_ = DEF.ID_
497497 <sql id =" selectHistoricProcessInstancesWithVariablesByQueryCriteriaSql" >
498498 from ${prefix}ACT_HI_PROCINST RES
499499 <!--
500- Doing a join on the definition table is OK, since it is a 1 :1 relationship.
500+ Doing a join on the definition table is OK, since it is an N :1 relationship.
501501 This has to be an outer join because historic data might exists, but definitions might have been deleted
502502 -->
503503 left outer join ${prefix}ACT_RE_PROCDEF DEF on RES.PROC_DEF_ID_ = DEF.ID_
You can’t perform that action at this time.
0 commit comments