add alias to always have the same name (#15960)

This commit is contained in:
Nitwel
2022-10-12 17:47:29 +02:00
committed by GitHub
parent 50859f852c
commit d5a161fb72

View File

@@ -679,7 +679,7 @@ export class PayloadService {
.from(relation.collection)
.where({ [relation.field]: parent })
.whereNotNull(sortField)
.max(sortField)
.max(sortField, { as: 'max' })
.first();
createPayload = alterations.create.map((item, index) => {