mirror of
https://github.com/strapi/strapi.git
synced 2025-11-02 19:04:38 +00:00
remove adjacent relations sorting as it is not necessary
This commit is contained in:
parent
114d67a9f2
commit
c3c8f40d5b
@ -869,7 +869,6 @@ const createEntityManager = (db) => {
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
.where(joinTable.on || {})
|
.where(joinTable.on || {})
|
||||||
.sort(orderColumnName, 'ASC')
|
|
||||||
.transacting(trx)
|
.transacting(trx)
|
||||||
.execute();
|
.execute();
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ const relationsOrderer = (initArr, idColumn, orderColumn) => {
|
|||||||
order: r[orderColumn],
|
order: r[orderColumn],
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const maxOrder = _.maxBy('order', arr).order;
|
const maxOrder = _.maxBy('order', arr)?.order || 0;
|
||||||
|
|
||||||
// TODO: Improve performance by using a map
|
// TODO: Improve performance by using a map
|
||||||
const findRelation = (id) => {
|
const findRelation = (id) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user