@punks/backend-entity-manager 0.0.431 → 0.0.433

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,13 @@ class EntitySerializer {
289
289
  }
290
290
  const entity = (definition.autoColumns ? { ...record } : {});
291
291
  for (const column of definition.columns) {
292
+ const columnName = normalizeSheetColumn(column.name);
293
+ console.log(columnName, column.name, record);
292
294
  if (!(column.name in record))
293
295
  continue;
294
- const columnName = normalizeSheetColumn(column.name);
295
296
  if (column.parseAction) {
296
297
  column.parseAction(record[columnName], entity);
298
+ delete record[column.name];
297
299
  continue;
298
300
  }
299
301
  if (typeof column.selector === "function") {
@@ -309,8 +311,6 @@ class EntitySerializer {
309
311
  }
310
312
  const validationErrors = [];
311
313
  for (const column of definition.columns) {
312
- if (!(column.name in record))
313
- continue;
314
314
  for (const validator of column.validators ?? []) {
315
315
  const result = validator.fn(entity);
316
316
  if (!result.isValid) {