Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
submodels [2026/09/08 20:37]
hermann
submodels [2026/09/08 20:44] (current)
hermann
Line 184: Line 184:
  
 Consider a local submodel **A** that depends on local submodels **B** and **C**, where **B** also depends on **C**. Publishing **A** as a user submodel produces a single user submodel, **A**, containing **B** and **C** as local submodels of **A**. **B** and **C** sit side by side inside **A**'​s own local submodel set, so **B** does not get a separate copy of **C** — it uses the single copy of **C** held by their common parent **A**, the same way one local submodel depends on another local submodel of the same model. **B** and **C** are not added to the user's submodel set as independent,​ top-level entries — only **A** is. Consider a local submodel **A** that depends on local submodels **B** and **C**, where **B** also depends on **C**. Publishing **A** as a user submodel produces a single user submodel, **A**, containing **B** and **C** as local submodels of **A**. **B** and **C** sit side by side inside **A**'​s own local submodel set, so **B** does not get a separate copy of **C** — it uses the single copy of **C** held by their common parent **A**, the same way one local submodel depends on another local submodel of the same model. **B** and **C** are not added to the user's submodel set as independent,​ top-level entries — only **A** is.
 +
 +This flat structure holds regardless of whether **A** uses **C** directly. Even if **C** is used only by **B**, and not by **A** itself, publishing **A** still places **B** and **C** side by side as local submodels of **A** — **C** is not nested inside **B**.
  
 ==== Republishing and Naming Collisions ==== ==== Republishing and Naming Collisions ====
Line 210: Line 212:
  
 The store submodel package therefore ends up containing two independent copies of **C**: one local to **A**, and one local to **B**. Once packaged, these copies are independent of each other, the same as any other local submodels obtained through copying (see [[#​copying_importing_a_local_submodel_between_models|Copying (Importing) a Local Submodel Between Models]]). The store submodel package therefore ends up containing two independent copies of **C**: one local to **A**, and one local to **B**. Once packaged, these copies are independent of each other, the same as any other local submodels obtained through copying (see [[#​copying_importing_a_local_submodel_between_models|Copying (Importing) a Local Submodel Between Models]]).
 +
 +Unlike publishing to a user submodel, this nesting follows the actual dependency graph. If **C** is used only by **B**, and not by **A** itself, the store submodel package nests **C** inside **B** instead of placing it directly inside **A**: **C** becomes a local submodel of **B**, and **B** a local submodel of **A**.
  
 ==== Dependencies Are Scoped to Their Store Submodel ==== ==== Dependencies Are Scoped to Their Store Submodel ====