fix adjacentRelations query to look for joinColum name

This commit is contained in:
Marc-Roig 2022-11-20 10:49:59 +01:00
parent 5fad91721b
commit 114d67a9f2

View File

@ -858,6 +858,7 @@ const createEntityManager = (db) => {
}, },
}, },
{ {
[joinColumn.name]: id,
[orderColumnName]: this.createQueryBuilder(joinTable.name) [orderColumnName]: this.createQueryBuilder(joinTable.name)
.max(orderColumnName) .max(orderColumnName)
.where({ [joinColumn.name]: id }) .where({ [joinColumn.name]: id })