[TIL] 25-02-03
nest js
데이터베이스에서 연결된 상위 테이블 가져오기
const card = await this.cardRepository.findOne({
where: { id: cardId },
relations: ['column', 'column.board'],
});
이런식으로 relations를 통해 상위 테이블로 거슬러 올라간다.
물론 constructor에 상위테이블 주입시켜줘야함.