기타 수정사항 적용
This commit is contained in:
@@ -32,6 +32,12 @@ interface ConnectionInfo {
|
||||
columns: string[];
|
||||
};
|
||||
};
|
||||
existingRelationship?: {
|
||||
relationshipName: string;
|
||||
relationshipType: string;
|
||||
connectionType: string;
|
||||
settings?: any;
|
||||
};
|
||||
}
|
||||
|
||||
// 연결 설정 타입
|
||||
@@ -150,14 +156,18 @@ export const ConnectionSetupModal: React.FC<ConnectionSetupModalProps> = ({
|
||||
setSelectedFromTable(fromTableName);
|
||||
setSelectedToTable(toTableName);
|
||||
|
||||
// 기존 관계 정보가 있으면 사용, 없으면 기본값 설정
|
||||
const existingRel = connection.existingRelationship;
|
||||
setConfig({
|
||||
relationshipName: `${fromDisplayName} → ${toDisplayName}`,
|
||||
relationshipType: "one-to-one",
|
||||
connectionType: "simple-key",
|
||||
relationshipName: existingRel?.relationshipName || `${fromDisplayName} → ${toDisplayName}`,
|
||||
relationshipType:
|
||||
(existingRel?.relationshipType as "one-to-one" | "one-to-many" | "many-to-one" | "many-to-many") ||
|
||||
"one-to-one",
|
||||
connectionType: (existingRel?.connectionType as "simple-key" | "data-save" | "external-call") || "simple-key",
|
||||
fromColumnName: "",
|
||||
toColumnName: "",
|
||||
description: `${fromDisplayName}과 ${toDisplayName} 간의 데이터 관계`,
|
||||
settings: {},
|
||||
description: existingRel?.settings?.description || `${fromDisplayName}과 ${toDisplayName} 간의 데이터 관계`,
|
||||
settings: existingRel?.settings || {},
|
||||
});
|
||||
|
||||
// 단순 키값 연결 기본값 설정
|
||||
|
||||
Reference in New Issue
Block a user