@g1cloud/entity-modeler-next 5.0.2 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/dedupeModelIds.d.ts +12 -0
- package/dist/core/fkDerived.d.ts +9 -0
- package/dist/entity-modeler.js +4075 -3992
- package/dist/entity-modeler.umd.cjs +16 -16
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DiagramLayout, LogicalModel } from './types';
|
|
2
|
+
export interface DedupeResult {
|
|
3
|
+
logical: LogicalModel;
|
|
4
|
+
layout: DiagramLayout;
|
|
5
|
+
/** 재발급 건수 — 호출자 로깅·검증용(0이면 no-op이었다). */
|
|
6
|
+
reissued: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 논리 모델의 modelId 유일성을 회복하고, 소유자를 특정할 수 있는 참조를 새 id로 잇는다.
|
|
10
|
+
* 레이아웃은 관계 앵커(`source/targetColumnRef`)만 영향을 받는다.
|
|
11
|
+
*/
|
|
12
|
+
export declare function dedupeModelIds(logical: LogicalModel, layout: DiagramLayout): DedupeResult;
|
package/dist/core/fkDerived.d.ts
CHANGED
|
@@ -33,5 +33,14 @@ export declare function isFkDerivedColumn(attr: Attribute): boolean;
|
|
|
33
33
|
* 표시에 쓴다(레거시 getForeignDatabaseAttributePlaceholder 동형). 1순위 derivedFrom.sourceAttributeRef
|
|
34
34
|
* (전파가 심은 권위), 2순위 관계 역참조로 부모 식별자 컬럼(derivedFrom 부재하는 레거시 v1 로드 FK 폴백).
|
|
35
35
|
* 못 찾으면 undefined.
|
|
36
|
+
*
|
|
37
|
+
* ★1순위 조회는 **관계가 지목한 부모 안을 먼저** 본다. 속성 modelId는 문서 안에서 유일해야 하지만
|
|
38
|
+
* 레거시 유래로 **엔티티 간 중복**인 문서가 실재하고(복제 후 이름만 바꾸고 id를 재발급하지 않은 지문),
|
|
39
|
+
* 그 경우 전역 순회의 first-match는 **배열에서 앞선 엔티티**를 집어 남의 컬럼을 원본으로 삼는다.
|
|
40
|
+
* 실측(2026-08-21 BNKR_SALES `module-marketing`): `FreeGiftPromo`(배열 35)와 `ProductGiftPromo`(65)가
|
|
41
|
+
* 속성·dbAttr 13쌍의 modelId를 공유해, 관계상 부모가 `ProductGiftPromo`인 자식 3건이 원본 컬럼을
|
|
42
|
+
* `product_gift_promo_sn` 대신 `promo_sn`으로 해석했다(DDL·코드젠·캔버스 전부에 전파).
|
|
43
|
+
* 부모 안에 없으면 종전대로 전역 순회로 폴백하므로, 관계가 stale한 경우의 방어(1순위를 derivedFrom에
|
|
44
|
+
* 둔 본래 이유)는 그대로다. id가 유일한 문서에서는 두 경로가 같은 속성을 찾아 **결과가 동일하다**.
|
|
36
45
|
*/
|
|
37
46
|
export declare function resolveFkOriginColumn(attr: Attribute, childEntity: Entity | null | undefined, entities: readonly Entity[], associations: readonly Association[], i?: number): DbColumn | undefined;
|