mirror of
https://github.com/strapi/strapi.git
synced 2025-10-30 01:17:28 +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 || {})
|
||||
.sort(orderColumnName, 'ASC')
|
||||
.transacting(trx)
|
||||
.execute();
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ const relationsOrderer = (initArr, idColumn, orderColumn) => {
|
||||
order: r[orderColumn],
|
||||
}));
|
||||
|
||||
const maxOrder = _.maxBy('order', arr).order;
|
||||
const maxOrder = _.maxBy('order', arr)?.order || 0;
|
||||
|
||||
// TODO: Improve performance by using a map
|
||||
const findRelation = (id) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user