Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 셀렉트박스 커스텀
- 옵저버블
- prisma
- Router
- route
- angular animation
- angular button
- 모달
- mysql if
- flex-1
- 검색
- 스크롤 이벤트
- summary
- TAILWIND
- ajax 사용 예시
- angular route
- Angular Router
- 호버
- scroll
- egov spring ajax 사용 예시
- Ionic modal
- Oracle LISTAGG 사용 예시
- ApexChart
- 아이오닉 스크롤 이벤트
- formgroup
- 앵귤러 애니메이션
- 스크롤 이벤트 감지
- 앵귤러 모달
- angular modal
- modal
Archives
- Today
- Total
깜놀하는 해므찌로
Prisma include 작성자 사용자 정보 함께 조회 본문
반응형
SMALL
0. 마우스를 가져다 대면 유저 테이블을 조회한다는 사실을 알 수 있습니다.
const entities = await this.prismaService.influencerRequest.findMany({
where,
orderBy,
take: option.pageSize,
skip: (option.pageNo - 1) * option.pageSize,
include: {
// 사용자 정보를 포함하여 조회
user: {
select: { nickname: true, username: true },
},
},
});
1. include 를 활용하여 user 테이블을 조회합니다.
2. 사용할 컬럼만 지목해서 가져옵니다. (닉네임, 성명)
3. true 를 명시하면 해당 컬럼 데이터도 가져오겠다는 뜻입니다.
반응형
LIST
'IT' 카테고리의 다른 글
Prisma Craete Log service search query / 쌓는 방식 로그 (0) | 2023.08.29 |
---|---|
Prisma Log Tx Transaction control 프리즈마 로그 트랜잭션 핸들링 예시 (0) | 2023.08.28 |
Angular tailwind CSS button disable example / button disabled (0) | 2023.08.24 |
법정동 스키마 구조 예시 Prisma 시도/시군구 (0) | 2023.08.22 |
bash deploy 배포 방법 예시 (0) | 2023.08.21 |