@finos/legend-query-builder 4.5.0 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,6 +37,7 @@ import {
37
37
  } from './QueryBuilderFilterState.js';
38
38
  import { QUERY_BUILDER_SUPPORTED_FUNCTIONS } from '../../graph/QueryBuilderMetaModelConst.js';
39
39
  import { DEFAULT_LAMBDA_VARIABLE_NAME } from '../QueryBuilderConfig.js';
40
+ import { buildPropertyExpressionChain } from '../QueryBuilderValueSpecificationBuilderHelper.js';
40
41
 
41
42
  const buildFilterConditionExpression = (
42
43
  filterState: QueryBuilderFilterState,
@@ -110,7 +111,19 @@ const buildFilterConditionExpression = (
110
111
  )
111
112
  : undefined;
112
113
  }
113
- const propertyExpression = guaranteeNonNullable(node.propertyExpression);
114
+ const lambdaParameterName = node.parentId
115
+ ? guaranteeType(
116
+ filterState.nodes.get(guaranteeNonNullable(node.parentId)),
117
+ QueryBuilderFilterTreeOperationNodeData,
118
+ ).lambdaParameterName
119
+ : undefined;
120
+ const propertyExpression = guaranteeNonNullable(
121
+ buildPropertyExpressionChain(
122
+ node.propertyExpressionState.propertyExpression,
123
+ node.propertyExpressionState.queryBuilderState,
124
+ lambdaParameterName ?? filterState.lambdaParameterName,
125
+ ),
126
+ );
114
127
  const clauses = node.childrenIds
115
128
  .map((e) => filterState.nodes.get(e))
116
129
  .filter(isNonNullable)