조인테이블의 컬럼 사용할 수 있도록 수정
This commit is contained in:
@@ -93,11 +93,11 @@ export class EntityJoinService {
|
||||
// 기본 SELECT 컬럼들
|
||||
const baseColumns = selectColumns.map((col) => `main.${col}`).join(", ");
|
||||
|
||||
// Entity 조인 컬럼들
|
||||
// Entity 조인 컬럼들 (COALESCE로 NULL을 빈 문자열로 처리)
|
||||
const joinColumns = joinConfigs
|
||||
.map(
|
||||
(config) =>
|
||||
`${config.referenceTable.substring(0, 3)}.${config.displayColumn} AS ${config.aliasColumn}`
|
||||
`COALESCE(${config.referenceTable.substring(0, 3)}.${config.displayColumn}, '') AS ${config.aliasColumn}`
|
||||
)
|
||||
.join(", ");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user