@punks/backend-entity-manager 0.0.429 → 0.0.430
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 +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -274,9 +274,9 @@ class EntitySerializer {
|
|
|
274
274
|
}
|
|
275
275
|
const entity = (definition.autoColumns ? { ...record } : {});
|
|
276
276
|
for (const column of definition.columns) {
|
|
277
|
-
|
|
278
|
-
if (!(columnName in record))
|
|
277
|
+
if (!(column.name in record))
|
|
279
278
|
continue;
|
|
279
|
+
const columnName = normalizeSheetColumn(column.name);
|
|
280
280
|
if (column.parseAction) {
|
|
281
281
|
column.parseAction(record[columnName], entity);
|
|
282
282
|
continue;
|
|
@@ -293,7 +293,7 @@ class EntitySerializer {
|
|
|
293
293
|
}
|
|
294
294
|
const validationErrors = [];
|
|
295
295
|
for (const column of definition.columns) {
|
|
296
|
-
if (!(
|
|
296
|
+
if (!(column.name in record))
|
|
297
297
|
continue;
|
|
298
298
|
for (const validator of column.validators ?? []) {
|
|
299
299
|
const result = validator.fn(entity);
|