Three constraints surfaced while building a real consumer project (a CLI system monitor — all value objects, no database). Each was resolvable, but none was obvious from the docs.
1. metadata.root childRules are closed
Adding new top-level node types (e.g. custom adapter.* / probe.* subtypes via a provider) requires registry.extend; without it the model fails to load with ERR_CHILD_NOT_ALLOWED. Worth a short "defining custom top-level types" doc section.
2. Declarative reference resolution only indexes object.* nodes
Cross-references from a template/adapter to a non-object.* node aren't resolved by the built-in resolver and must be hand-walked in a provider validate hook. Adopters modeling references to non-object nodes should know this up front.
3. MetaobjectsGenConfig requires dbImport + dialect even when no DB code is generated
A project that declares only value objects (no write-through entities) generates zero DB / query / route code — yet omitting dbImport/dialect is a tsc type error, so they end up as dead-but-mandatory config.
Ask: make dbImport/dialect optional when the model has no write-through entities, or document that they're required regardless and inert for value-object-only models.
Context
All three came up in a from-scratch TypeScript adopter (the smon system monitor). Happy to link the repo/config if useful.
Three constraints surfaced while building a real consumer project (a CLI system monitor — all value objects, no database). Each was resolvable, but none was obvious from the docs.
1.
metadata.rootchildRules are closedAdding new top-level node types (e.g. custom
adapter.*/probe.*subtypes via a provider) requiresregistry.extend; without it the model fails to load withERR_CHILD_NOT_ALLOWED. Worth a short "defining custom top-level types" doc section.2. Declarative reference resolution only indexes
object.*nodesCross-references from a template/adapter to a non-
object.*node aren't resolved by the built-in resolver and must be hand-walked in a providervalidatehook. Adopters modeling references to non-object nodes should know this up front.3.
MetaobjectsGenConfigrequiresdbImport+dialecteven when no DB code is generatedA project that declares only value objects (no write-through entities) generates zero DB / query / route code — yet omitting
dbImport/dialectis a tsc type error, so they end up as dead-but-mandatory config.Ask: make
dbImport/dialectoptional when the model has no write-through entities, or document that they're required regardless and inert for value-object-only models.Context
All three came up in a from-scratch TypeScript adopter (the smon system monitor). Happy to link the repo/config if useful.