mirror of
https://github.com/strapi/strapi.git
synced 2025-11-23 05:30:11 +00:00
max order default to 0 if no relations
This commit is contained in:
parent
640adedd73
commit
36ca8d7df6
@ -859,7 +859,7 @@ const createEntityManager = (db) => {
|
|||||||
if (!adjacentRelations.find((r) => r[orderColumnName] === maxOrder.max)) {
|
if (!adjacentRelations.find((r) => r[orderColumnName] === maxOrder.max)) {
|
||||||
adjacentRelations.push({
|
adjacentRelations.push({
|
||||||
[inverseJoinColumn.name]: -1,
|
[inverseJoinColumn.name]: -1,
|
||||||
[joinTable.orderColumnName]: maxOrder.max,
|
[joinTable.orderColumnName]: maxOrder.max || 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user