added child condition for export
package com.khartec.waltz.web.endpoints.extracts;
import com.khartec.waltz.data.application.ApplicationIdSelectorFactory;
+import com.khartec.waltz.data.data_type.DataTypeIdSelectorFactory;
import com.khartec.waltz.model.EntityKind;
import com.khartec.waltz.model.IdSelectionOptions;
import org.jooq.*;
@@ -52,6 +53,7 @@ public class LogicalFlowExtractor extends DirectQueryBasedDataExtractor {
newArrayList(EntityKind.APPLICATION, EntityKind.ACTOR));
private final ApplicationIdSelectorFactory applicationIdSelectorFactory = new ApplicationIdSelectorFactory();
+ private final DataTypeIdSelectorFactory dataTypeIdSelectorFactory = new DataTypeIdSelectorFactory();
@Autowired
public LogicalFlowExtractor(DSLContext dsl) {
@@ -74,7 +76,7 @@ public class LogicalFlowExtractor extends DirectQueryBasedDataExtractor {
Select<Record1<Long>> appIdSelector = applicationIdSelectorFactory.apply(options);
Condition conditionForDataType = EntityKind.DATA_TYPE.equals(options.entityReference().kind())
- ? LOGICAL_FLOW_DECORATOR.DECORATOR_ENTITY_ID.eq(options.entityReference().id())
+ ? LOGICAL_FLOW_DECORATOR.DECORATOR_ENTITY_ID.in(dataTypeIdSelectorFactory.apply(options))
: DSL.trueCondition();
Field<Long> sourceFlowId = LOGICAL_FLOW.ID.as("sourceFlowId");
