mirror of
https://github.com/strapi/strapi.git
synced 2025-07-19 07:02:26 +00:00
make strict connect explicit when inserting relation
This commit is contained in:
parent
51cd3ddc85
commit
cf01fb8db6
@ -586,7 +586,12 @@ const createEntityManager = (db) => {
|
||||
});
|
||||
} else if (cleanRelationData.connect && hasOrderColumn(attribute)) {
|
||||
// use position attributes to calculate order
|
||||
const orderMap = relationsOrderer([], inverseJoinColumn.name, joinTable.orderColumnName)
|
||||
const orderMap = relationsOrderer(
|
||||
[],
|
||||
inverseJoinColumn.name,
|
||||
joinTable.orderColumnName,
|
||||
true // Always make an strict connect when inserting
|
||||
)
|
||||
.connect(relsToAdd)
|
||||
.get()
|
||||
// set the order based on the order of the ids
|
||||
|
Loading…
x
Reference in New Issue
Block a user