@ruiapp/rapid-core 0.1.25 → 0.1.26
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.
- package/dist/index.js +4 -0
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/dataAccess/entityManager.ts +8 -0
- package/src/types.ts +5 -0
package/dist/index.js
CHANGED
|
@@ -1951,6 +1951,10 @@ async function replaceFiltersWithFiltersOperator(server, model, filters) {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
}
|
|
1953
1953
|
else {
|
|
1954
|
+
const property = lodash.find(model.properties, (property) => property.code === filter.field);
|
|
1955
|
+
if (property) {
|
|
1956
|
+
filter.field = property.columnName || property.code;
|
|
1957
|
+
}
|
|
1954
1958
|
replacedFilters.push(filter);
|
|
1955
1959
|
}
|
|
1956
1960
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -278,6 +278,7 @@ export type EntityFilterUnaryOperators = "null" | "notNull";
|
|
|
278
278
|
export type EntityFilterExistenceOperators = "exists" | "notExists";
|
|
279
279
|
export type EntityFilterOperators = EntityFilterRelationalOperators | EntityFilterSetOperators | EntityFilterLogicalOperators | EntityFilterUnaryOperators | EntityFilterExistenceOperators;
|
|
280
280
|
export type EntityFilterOptions = FindEntityRelationalFilterOptions | FindEntitySetFilterOptions | FindEntityLogicalFilterOptions | FindEntityUnaryFilterOptions | FindEntityExistenceFilterOptions;
|
|
281
|
+
export type EntityNonRelationPropertyFilterOptions = FindEntityRelationalFilterOptions | FindEntitySetFilterOptions | FindEntityUnaryFilterOptions;
|
|
281
282
|
export interface FindEntityOptions {
|
|
282
283
|
filters?: EntityFilterOptions[];
|
|
283
284
|
orderBy?: FindEntityOrderByOptions[];
|
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
CreateEntityOptions,
|
|
6
6
|
EntityFilterOperators,
|
|
7
7
|
EntityFilterOptions,
|
|
8
|
+
EntityNonRelationPropertyFilterOptions,
|
|
8
9
|
FindEntityOptions,
|
|
9
10
|
FindEntityOrderByOptions,
|
|
10
11
|
IRpdDataAccessor,
|
|
@@ -335,6 +336,13 @@ async function replaceFiltersWithFiltersOperator(
|
|
|
335
336
|
});
|
|
336
337
|
}
|
|
337
338
|
} else {
|
|
339
|
+
const property: RpdDataModelProperty = find(
|
|
340
|
+
model.properties,
|
|
341
|
+
(property: RpdDataModelProperty) => property.code === (filter as EntityNonRelationPropertyFilterOptions).field,
|
|
342
|
+
);
|
|
343
|
+
if (property) {
|
|
344
|
+
(filter as EntityNonRelationPropertyFilterOptions).field = property.columnName || property.code;
|
|
345
|
+
}
|
|
338
346
|
replacedFilters.push(filter);
|
|
339
347
|
}
|
|
340
348
|
}
|
package/src/types.ts
CHANGED
|
@@ -378,6 +378,11 @@ export type EntityFilterOptions =
|
|
|
378
378
|
| FindEntityUnaryFilterOptions
|
|
379
379
|
| FindEntityExistenceFilterOptions;
|
|
380
380
|
|
|
381
|
+
export type EntityNonRelationPropertyFilterOptions =
|
|
382
|
+
| FindEntityRelationalFilterOptions
|
|
383
|
+
| FindEntitySetFilterOptions
|
|
384
|
+
| FindEntityUnaryFilterOptions;
|
|
385
|
+
|
|
381
386
|
export interface FindEntityOptions {
|
|
382
387
|
filters?: EntityFilterOptions[];
|
|
383
388
|
orderBy?: FindEntityOrderByOptions[];
|