@g1cloud/entity-modeler-next 5.0.0-alpha.5 → 5.0.0-alpha.7

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.
@@ -34,6 +34,14 @@ export interface EntitySpec {
34
34
  stereotype?: ClassStereotype;
35
35
  /** 설정 시 `table.physicalName`. */
36
36
  physicalName?: string;
37
+ /**
38
+ * JPA `@Version`(낙관적 락) 사용 여부 → `Entity.jpaAttrs.useVersion`. 코드의 `@Version` 필드는 별도 속성으로
39
+ * 모델링하지 않고 이 엔티티 레벨 플래그로 흡수한다(버전 컬럼은 호스트 코드젠 소유). resolver가 true일 때만
40
+ * `jpaAttrs.useVersion:true`를 세팅(false/미설정은 생략 — round-trip diff 방지). *기존* 엔티티에 켤 땐 이 스펙이
41
+ * 아니라 `entity.update` patch의 **dotted key** `{'jpaAttrs.useVersion': true}`를 써야 형제 jpaAttrs 플래그를
42
+ * 통째 $set로 덮어쓰지 않는다(호스트 opInterpreter는 patch를 per-key $set).
43
+ */
44
+ useVersion?: boolean;
37
45
  /** inline 속성 — 배열 순서가 곧 `order`. GroupCodeEnum+groupCode 규칙은 `attribute.add`와 동일하게 강제. */
38
46
  attributes?: AttrSpec[];
39
47
  /** inline 인덱스 — 컬럼 핸들은 *이 엔티티가 inline으로 만드는* dbAttr 내에서 해소된다(속성 inline 동반 전제). */
@@ -52,6 +60,12 @@ export interface AttrSpec {
52
60
  type: string;
53
61
  identifier?: boolean;
54
62
  notNull?: boolean;
63
+ /**
64
+ * JPA `@Transient` — 비영속 속성. true면 `Attribute.transient:true`(속성 레벨 플래그). 컬럼을 만들지 않는
65
+ * 속성이므로 physicalName/dataType 등 컬럼 필드는 함께 주지 않는다(주면 dbAttr가 생성됨). false/미설정은
66
+ * 생략(round-trip diff 방지). *기존* 속성에 켤 땐 `attribute.update` patch `{transient:true}`로도 가능.
67
+ */
68
+ transient?: boolean;
55
69
  /** 설정 시 단일 dbAttr 컬럼 생성(미설정이면 name을 물리명으로). */
56
70
  physicalName?: string;
57
71
  /** dbAttr 물리 타입(예: 'BIGINT'). physicalName/dataType/length/scale 중 하나라도 있으면 dbAttr 생성. */