Select attributes on repository.find() with relations (TypeORM)

It’s bit late but for all others who visit this page may be helpful
there is a option available in typeorm so we can get the result how we want.

return this.repository.find({
  relations: ['user'],
  loadRelationIds: true,
  where: { ... },
  order: { ... }
});

enter image description here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)