@ruiapp/rapid-core 0.1.44 → 0.1.45
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 +3 -0
- package/package.json +1 -1
- package/src/dataAccess/entityManager.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -1960,6 +1960,9 @@ function convertEntityOrderByToRowOrderBy(server, model, baseModel, orderByList)
|
|
|
1960
1960
|
if (!property) {
|
|
1961
1961
|
property = getEntityProperty(server, model, (item) => item.relation === "one" && item.targetIdColumnName === orderBy.field);
|
|
1962
1962
|
}
|
|
1963
|
+
if (!property) {
|
|
1964
|
+
property = getEntityProperty(server, model, (item) => item.columnName === orderBy.field);
|
|
1965
|
+
}
|
|
1963
1966
|
if (!property) {
|
|
1964
1967
|
throw new Error(`Unkown orderBy field '${orderBy.field}'`);
|
|
1965
1968
|
}
|
package/package.json
CHANGED
|
@@ -36,6 +36,10 @@ function convertEntityOrderByToRowOrderBy(server: IRpdServer, model: RpdDataMode
|
|
|
36
36
|
property = getEntityProperty(server, model, (item) => item.relation === "one" && item.targetIdColumnName === orderBy.field);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
if (!property) {
|
|
40
|
+
property = getEntityProperty(server, model, (item) => item.columnName === orderBy.field);
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
if (!property) {
|
|
40
44
|
throw new Error(`Unkown orderBy field '${orderBy.field}'`);
|
|
41
45
|
}
|