framework-do-dede 1.0.40 → 1.0.41
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.
|
@@ -48,7 +48,7 @@ export function DbColumn(configOrColumn) {
|
|
|
48
48
|
...(configs.get(propertyKey) || []),
|
|
49
49
|
{
|
|
50
50
|
column: configOrColumn,
|
|
51
|
-
serialize: (value,
|
|
51
|
+
serialize: (value, constructorProps) => value
|
|
52
52
|
}
|
|
53
53
|
]);
|
|
54
54
|
}
|
|
@@ -57,7 +57,7 @@ export function DbColumn(configOrColumn) {
|
|
|
57
57
|
...(configs.get(propertyKey) || []),
|
|
58
58
|
{
|
|
59
59
|
column: configOrColumn.column,
|
|
60
|
-
serialize: configOrColumn.serialize || ((value,
|
|
60
|
+
serialize: configOrColumn.serialize || ((value, constructorProps) => value)
|
|
61
61
|
}
|
|
62
62
|
]);
|
|
63
63
|
}
|
package/dist/domain/Entity.js
CHANGED
|
@@ -64,7 +64,7 @@ export class Entity {
|
|
|
64
64
|
const rawValue = this[propertyKey];
|
|
65
65
|
for (const config of configs) {
|
|
66
66
|
try {
|
|
67
|
-
let serializedValue = config.serialize ? await config.serialize(rawValue,
|
|
67
|
+
let serializedValue = config.serialize ? await config.serialize(rawValue, dbRecord) : rawValue;
|
|
68
68
|
if (!serializedValue)
|
|
69
69
|
continue;
|
|
70
70
|
if (config.column) {
|