@punks/backend-entity-manager 0.0.430 → 0.0.432

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/cjs/index.js CHANGED
@@ -289,11 +289,12 @@ class EntitySerializer {
289
289
  }
290
290
  const entity = (definition.autoColumns ? { ...record } : {});
291
291
  for (const column of definition.columns) {
292
- if (!(column.name in record))
293
- continue;
294
292
  const columnName = normalizeSheetColumn(column.name);
293
+ if (!(columnName in record))
294
+ continue;
295
295
  if (column.parseAction) {
296
296
  column.parseAction(record[columnName], entity);
297
+ delete record[column.name];
297
298
  continue;
298
299
  }
299
300
  if (typeof column.selector === "function") {
@@ -305,11 +306,10 @@ class EntitySerializer {
305
306
  .map((x) => applyModifiers(x, column.modifiers))
306
307
  .filter((x) => isValidValue(x))
307
308
  : applyModifiers(parsedColumn, column.modifiers);
309
+ delete record[column.name];
308
310
  }
309
311
  const validationErrors = [];
310
312
  for (const column of definition.columns) {
311
- if (!(column.name in record))
312
- continue;
313
313
  for (const validator of column.validators ?? []) {
314
314
  const result = validator.fn(entity);
315
315
  if (!result.isValid) {