@strapi/database 5.5.0 → 5.5.1
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 +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -6
package/dist/index.js
CHANGED
|
@@ -5586,8 +5586,8 @@ const createEntityManager = (db) => {
|
|
|
5586
5586
|
// Always make a strict connect when inserting
|
|
5587
5587
|
).connect(
|
|
5588
5588
|
// Merge id & __type to get a single id key
|
|
5589
|
-
dataset.map(encodePolymorphicRelation({ idColumn: "id", typeColumn:
|
|
5590
|
-
).get().reduce((acc, rel, idx) => ({ ...acc, [rel.id]: idx }), {});
|
|
5589
|
+
dataset.map(encodePolymorphicRelation({ idColumn: "id", typeColumn: typeField }))
|
|
5590
|
+
).get().reduce((acc, rel, idx) => ({ ...acc, [rel.id]: idx + 1 }), {});
|
|
5591
5591
|
rows.forEach((row) => {
|
|
5592
5592
|
const rowId = row[morphColumn.idColumn.name];
|
|
5593
5593
|
const rowType = row[morphColumn.typeColumn.name];
|