@zenstackhq/orm 3.0.0-beta.30 → 3.0.0-beta.31
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/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1546,7 +1546,13 @@ var PostgresCrudDialect = class extends BaseCrudDialect {
|
|
|
1546
1546
|
} else if (value instanceof AnyNullClass) {
|
|
1547
1547
|
(0, import_common_helpers3.invariant)(false, "should not reach here: AnyNull is not a valid input value");
|
|
1548
1548
|
}
|
|
1549
|
-
if (
|
|
1549
|
+
if (isTypeDef(this.schema, type)) {
|
|
1550
|
+
if (typeof value !== "string") {
|
|
1551
|
+
return JSON.stringify(value);
|
|
1552
|
+
} else {
|
|
1553
|
+
return value;
|
|
1554
|
+
}
|
|
1555
|
+
} else if (Array.isArray(value)) {
|
|
1550
1556
|
if (type === "Json" && !forArrayField) {
|
|
1551
1557
|
return JSON.stringify(value);
|
|
1552
1558
|
} else {
|