@ruiapp/rapid-core 0.1.17 → 0.1.18

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 CHANGED
@@ -1643,8 +1643,13 @@ function mapDbRowToEntity(model, row, keepNonPropertyFields) {
1643
1643
  }
1644
1644
  }
1645
1645
  if (isRelationProp) {
1646
- if (row[propertyName] && !result[propertyName]) {
1647
- result[propertyName] = row[propertyName];
1646
+ if (row[propertyName]) {
1647
+ if (!result[propertyName]) {
1648
+ result[propertyName] = row[propertyName];
1649
+ }
1650
+ }
1651
+ else if (keepNonPropertyFields) {
1652
+ result[columnName] = row[columnName];
1648
1653
  }
1649
1654
  }
1650
1655
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruiapp/rapid-core",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "keywords": [],
@@ -31,8 +31,12 @@ export function mapDbRowToEntity(model: RpdDataModel, row: any, keepNonPropertyF
31
31
  }
32
32
 
33
33
  if (isRelationProp) {
34
- if (row[propertyName] && !result[propertyName]) {
35
- result[propertyName] = row[propertyName];
34
+ if (row[propertyName]) {
35
+ if (!result[propertyName]) {
36
+ result[propertyName] = row[propertyName];
37
+ }
38
+ } else if (keepNonPropertyFields) {
39
+ result[columnName] = row[columnName];
36
40
  }
37
41
  } else {
38
42
  if (!result[propertyName]) {