Member Junction
    Preparing search index...
    • Apply an includeSchemas positive scope by appending every out-of-scope schema in allSchemas to config.excludeSchemas in place. No-op when includeSchemas is absent or empty, which preserves classic exclude-only behavior exactly. Idempotent, so it is safe to call from more than one phase as the schema universe becomes better known.

      allSchemas must be the DATABASE's schema list, not the schemas present in loaded metadata. The primary job of an include list is to keep CodeGen off schemas it does not own — and the highest-risk case is a schema MJ has never seen before, because createNewEntities() discovers tables with no EntityID straight from the database and filters them only through excludeSchemas. A universe derived from Metadata.Entities contains, by definition, only schemas that ALREADY have entities, so it cannot exclude a never-seen schema: that schema would be adopted into metadata on the first run and then excluded on every subsequent run, leaving its entity records permanently orphaned. Callers without database access (e.g. the --skipdb file-generation path) may pass the metadata-derived universe as a secondary safety net, but it is not sufficient on its own.

      Parameters

      • allSchemas: string[]

        the schema universe to scope against

      • config: SchemaScopeConfig

        the config to mutate; excludeSchemas is created if absent

      Returns string[]

      the schema names that were newly appended (empty when the scope is unused or already applied)