TypeORM 반환 데이터 구조
316
작성한 질문수 1
아래와 같이 조인했을 시에 조인 결과가 배열안에 객체로 나오는데 sequelize처럼 여러 객체로 결과 반환할 수 있는 방법이 있을까요? 혹시 몰라서 OneToOne으로 관계 설정 맺었는데 맞는 방법일까요:
[
{
"id": 30,
"equipmentName": "수도(용수) 유량계",
"locationMainId": 1,
"locationSubId": 3,
"importance": null,
"energyId": 30,
"installDtm": null,
"serialNum": null,
"energyPurposeName": "급탕",
"name": "여자화장실 온수기수도계량기",
"remark": null,
"created": "2021-05-20T00:52:11.000Z",
"updated": "2021-06-15T00:44:36.000Z",
"x": 100,
"y": 100,
"webaccessTags": [
{
"tagname": "T3_PT1_Freq*01M",
"equipmentMgmtId": 30,
"tagDescription": "temperature",
"unit": null,
"unitConversion": { "type": "Buffer", "data": [0] },
"isTrend": { "type": "Buffer", "data": [0] },
"loggingTime": 300,
"energyType": null
}
]
},
{
"id": 54,
"equipmentName": "습도 계측기",
"locationMainId": 1,
"locationSubId": 2,
"importance": null,
"energyId": null,
"installDtm": null,
"serialNum": null,
"energyPurposeName": null,
"name": "복도습도",
"remark": null,
"created": "2021-05-20T01:12:12.000Z",
"updated": "2021-06-14T09:02:02.000Z",
"x": 0,
"y": 0,
"webaccessTags": [
{
"tagname": "T3_PT1_Humidity*01M",
"equipmentMgmtId": 54,
"tagDescription": "123",
"unit": null,
"unitConversion": { "type": "Buffer", "data": [0] },
"isTrend": { "type": "Buffer", "data": [0] },
"loggingTime": 60,
"energyType": "습도계"
}
]
},
{
"id": 53,
"equipmentName": "온도 계측기",
"locationMainId": 1,
"locationSubId": 2,
"importance": null,
"energyId": null,
"installDtm": null,
"serialNum": null,
"energyPurposeName": null,
"name": "복도온도",
"remark": null,
"created": "2021-05-20T01:11:58.000Z",
"updated": "2021-06-14T09:02:03.000Z",
"x": 0,
"y": 0,
"webaccessTags": [
{
"tagname": "T3_PT1_Temp*01M",
"equipmentMgmtId": 53,
"tagDescription": "123",
"unit": null,
"unitConversion": { "type": "Buffer", "data": [0] },
"isTrend": { "type": "Buffer", "data": [0] },
"loggingTime": 60,
"energyType": "온도계"
}
]
}
]
답변 1
강의자료는 어디서 다운받나요?
0
119
4
질문 있습니다.
0
300
3
(강의 5:42 질문) providers를 통한 여러 개의 인스턴스 생성 & exports 통한 싱글톤 생성
0
154
2
코드 편집기 확장 프로그램
0
210
2
(질문)비밀 저장소에 접근하기 위한 인증 정보는 로컬 .env에 저장하는지?
0
148
2
(질문)외부 저장소를 통한 환경변수 불러오기 비동기 질문
0
170
3
로그인을 해도 LoggedInGuard쪽에서 false값이 나옵니다.
0
152
2
로그인방법이 고민됩니다.
0
191
2
yarn seed 명령어 실행 시 데이터 삽입 안됨
0
297
4
yarn run db:create 시에 발생하는 데코레이터 오류
0
243
2
npm run db:create 시에 발생하는 decorating 오류
0
235
2
RxJS 디버깅 질문 있습니다.
0
190
3
CacheManager에 대해 질문 있습니다.
0
176
2
로깅은 어떻게 하는게 효율적일까요?
0
226
1
CORS 질문 있습니다.
0
418
2
쿠키 옵션에 대해서 질문 있습니다.
0
185
2
로그아웃 요청이 403 forbidden 에러가 나는데 왜그런걸까요??
0
450
1
401 unauthorized문제
0
289
1
가드의 장점에 대해서 질문이 있습니다.
0
225
1
로그 관리에 대해 질문 있습니다.
0
252
2
CORS 에러 질문 있습니다.
0
319
2
배포 환경 DB 연결 질문 있습니다.
0
411
2
socket io 미 연결 문제 (nest & flutter)
1
1156
3
no elements in sequence 에러 관해서 질문이 있습니다.
0
456
1





