반응형
const [todos, count] = await this.repository.createQueryBuilder('todo')
.leftJoinAndSelect('todo.subtodos', 'subtodo')
.where('todo.user = :userId', { userId })
.orderBy('todo.createdAt', 'DESC')
.skip(skip)
.take(limit)
.getManyAndCount();
반응형