Skip to content

Commit

Permalink
Merge pull request #7186 from deutschebank/db-contrib/7179-duplicatat…
Browse files Browse the repository at this point in the history
…ion-of-rows-in-logical-flow-export

Db contrib/7179 duplicatation of rows in logical flow export
  • Loading branch information
davidwatkins73 authored Nov 13, 2024
2 parents f34071b + e945ffb commit 0a78f26
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.finos.waltz.data.application.ApplicationIdSelectorFactory;
import org.finos.waltz.data.data_type.DataTypeIdSelectorFactory;
import org.finos.waltz.model.EntityKind;
import org.finos.waltz.model.FlowDirection;
import org.finos.waltz.model.IdSelectionOptions;
import org.finos.waltz.schema.tables.FlowClassification;
import org.finos.waltz.web.WebUtilities;
Expand Down Expand Up @@ -170,9 +171,11 @@ private SelectConditionStep<Record> prepareQuery(DSLContext dsl, IdSelectionOpti
.on(DATA_TYPE.ID.eq(LOGICAL_FLOW_DECORATOR.DECORATOR_ENTITY_ID)
.and(LOGICAL_FLOW_DECORATOR.DECORATOR_ENTITY_KIND.eq(EntityKind.DATA_TYPE.name())))
.innerJoin(sourceClassification)
.on(sourceClassification.CODE.eq(LOGICAL_FLOW_DECORATOR.RATING))
.on(sourceClassification.CODE.eq(LOGICAL_FLOW_DECORATOR.RATING)
.and(sourceClassification.DIRECTION.eq(FlowDirection.OUTBOUND.name())))
.innerJoin(targetClassification)
.on(targetClassification.CODE.eq(LOGICAL_FLOW_DECORATOR.TARGET_INBOUND_RATING))
.on(targetClassification.CODE.eq(LOGICAL_FLOW_DECORATOR.TARGET_INBOUND_RATING)
.and(targetClassification.DIRECTION.eq(FlowDirection.INBOUND.name())))
.where(dsl.renderInlined(LOGICAL_FLOW.ENTITY_LIFECYCLE_STATUS.ne(REMOVED.name())
.and(LOGICAL_FLOW.IS_REMOVED.isFalse())
.and(conditionForDataType)
Expand Down

0 comments on commit 0a78f26

Please sign in to comment.