Hi I would like to do something like this -
where: {id : id},
relations: {
photos: true
},
photos: {
take: 10,
skip: 5
}
I want to add take
and skip
inside relations. Do you have a suggestion?
Thank you.
Hi I would like to do something like this -
where: {id : id},
relations: {
photos: true
},
photos: {
take: 10,
skip: 5
}
I want to add take
and skip
inside relations. Do you have a suggestion?
Thank you.
maybe you can take a look at this code:
async findSomethings(ids, page, limit) {
aRepository.find({
where: {
id: In(ids)
},
relations: ["photos"],
take: limit,
skip: (page - 1) * limit,
})
}
for reference maybe you can see more detaiils in typeorm documentation https://typeorm.io/find-options, thank you