@ruiapp/rapid-core 0.1.46 → 0.1.47

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
@@ -2442,7 +2442,7 @@ async function createEntity(server, dataAccessor, options, plugin) {
2442
2442
  row.id = newBaseRow.id;
2443
2443
  }
2444
2444
  const newRow = await dataAccessor.create(row);
2445
- const newEntity = mapDbRowToEntity(server, model, Object.assign(newBaseRow, newRow), true);
2445
+ const newEntity = mapDbRowToEntity(server, model, newBaseRow ? Object.assign(newBaseRow, newRow) : newRow, true);
2446
2446
  // save many-relation properties
2447
2447
  for (const property of manyRelationPropertiesToCreate) {
2448
2448
  newEntity[property.code] = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruiapp/rapid-core",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -560,7 +560,7 @@ async function createEntity(server: IRpdServer, dataAccessor: IRpdDataAccessor,
560
560
  row.id = newBaseRow.id;
561
561
  }
562
562
  const newRow = await dataAccessor.create(row);
563
- const newEntity = mapDbRowToEntity(server, model, Object.assign(newBaseRow, newRow), true);
563
+ const newEntity = mapDbRowToEntity(server, model, newBaseRow ? Object.assign(newBaseRow, newRow) : newRow, true);
564
564
 
565
565
  // save many-relation properties
566
566
  for (const property of manyRelationPropertiesToCreate) {