📅  最后修改于: 2022-03-11 15:00:34.584000             🧑  作者: 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