📅  最后修改于: 2022-03-11 14:55:18.232000             🧑  作者: Mango
const result = await userRepo
.createQueryBuilder('user')
.leftJoinAndSelect(
qb => qb
.select()
.from(UserPhotos, 'p')
.orderBy({ 'p.updatedAt': 'ASC' })
.limit(5),
'photos',
'photos.userId = user.id' // the answer
)
.getRawMany() // .getMany() seems not working