How to return only some columns of a relations with Typeorm
Ok, I'm having trouble with getting the relations with typeorm. When I run the service it returns all the data from the relation, and I want only specific fields, like id and name. Here's my code: async findById(id: string): Promise<UsersUseOfferHistoric> { return await this.repository.findOne({ where: { id }, relations: ['userId', 'offerId'], }); } He