fix: on nested relations discovery use alias of parent relation first (#630)

This commit is contained in:
David 2023-05-23 20:37:08 +03:00 committed by GitHub
parent a1f2f02c89
commit 245127a74b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,7 @@ export async function paginate<T extends ObjectLiteral>(
) )
if (typeof relationSchema === 'object') { if (typeof relationSchema === 'object') {
createQueryBuilderRelations(relationName, relationSchema, `${prefix}_${relationName}`) createQueryBuilderRelations(relationName, relationSchema, `${alias ?? prefix}_${relationName}`)
} }
}) })
} }