Skip to content

Commit 6f2d9b9

Browse files
Prathamesh Manefiliphr
authored andcommitted
Fix mapping comments regarding instance to definition relation
1 parent 3fa553f commit 6f2d9b9

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/mapping/entity/CaseInstance.xml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
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}
@@ -325,7 +325,7 @@
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>
@@ -369,7 +369,7 @@
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>

‎modules/flowable-cmmn-engine/src/main/resources/org/flowable/cmmn/db/mapping/entity/HistoricCaseInstance.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
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_
@@ -348,7 +348,7 @@
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_

‎modules/flowable-engine/src/main/resources/org/flowable/db/mapping/entity/Execution.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@
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>
@@ -693,7 +693,7 @@
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>

‎modules/flowable-engine/src/main/resources/org/flowable/db/mapping/entity/HistoricProcessInstance.xml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@
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_
@@ -497,7 +497,7 @@
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_

0 commit comments

Comments
 (0)