@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.mjs
CHANGED
|
@@ -5554,8 +5554,8 @@ const createEntityManager = (db) => {
|
|
|
5554
5554
|
// Always make a strict connect when inserting
|
|
5555
5555
|
).connect(
|
|
5556
5556
|
// Merge id & __type to get a single id key
|
|
5557
|
-
dataset.map(encodePolymorphicRelation({ idColumn: "id", typeColumn:
|
|
5558
|
-
).get().reduce((acc, rel, idx) => ({ ...acc, [rel.id]: idx }), {});
|
|
5557
|
+
dataset.map(encodePolymorphicRelation({ idColumn: "id", typeColumn: typeField }))
|
|
5558
|
+
).get().reduce((acc, rel, idx) => ({ ...acc, [rel.id]: idx + 1 }), {});
|
|
5559
5559
|
rows.forEach((row) => {
|
|
5560
5560
|
const rowId = row[morphColumn.idColumn.name];
|
|
5561
5561
|
const rowType = row[morphColumn.typeColumn.name];
|