@strapi/database 4.25.20 → 4.25.22
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.js
CHANGED
|
@@ -6098,7 +6098,7 @@ const createConnection = (config) => {
|
|
|
6098
6098
|
};
|
|
6099
6099
|
const debug = createDebug__default.default("strapi::database");
|
|
6100
6100
|
const isMorphRelationWithPivot = (attribute, pivot) => {
|
|
6101
|
-
return attribute.type === "relation" && "relation" in attribute && "joinTable" in attribute && "
|
|
6101
|
+
return attribute.type === "relation" && "relation" in attribute && "joinTable" in attribute && "name" in attribute.joinTable && "pivotColumns" in attribute.joinTable && attribute.joinTable.pivotColumns.includes(pivot);
|
|
6102
6102
|
};
|
|
6103
6103
|
const filterMorphRelationalAttributes = (attributes, pivot) => {
|
|
6104
6104
|
return Object.values(attributes).filter(
|