@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/esm/index.js CHANGED
@@ -274,11 +274,12 @@ class EntitySerializer {
274
274
  }
275
275
  const entity = (definition.autoColumns ? { ...record } : {});
276
276
  for (const column of definition.columns) {
277
- if (!(column.name in record))
278
- continue;
279
277
  const columnName = normalizeSheetColumn(column.name);
278
+ if (!(columnName in record))
279
+ continue;
280
280
  if (column.parseAction) {
281
281
  column.parseAction(record[columnName], entity);
282
+ delete record[column.name];
282
283
  continue;
283
284
  }
284
285
  if (typeof column.selector === "function") {
@@ -290,11 +291,10 @@ class EntitySerializer {
290
291
  .map((x) => applyModifiers(x, column.modifiers))
291
292
  .filter((x) => isValidValue(x))
292
293
  : applyModifiers(parsedColumn, column.modifiers);
294
+ delete record[column.name];
293
295
  }
294
296
  const validationErrors = [];
295
297
  for (const column of definition.columns) {
296
- if (!(column.name in record))
297
- continue;
298
298
  for (const validator of column.validators ?? []) {
299
299
  const result = validator.fn(entity);
300
300
  if (!result.isValid) {