docs(db): owned-lookup call-site convention; refresh side effect; e2e ORM module spread notes

This commit is contained in:
jubnl
2026-09-22 12:53:47 +02:00
parent 4209343328
commit b0905f9867
5 changed files with 25 additions and 3 deletions
+5 -2
View File
@@ -101,10 +101,13 @@ export async function createTestOrm(
* middleware, since D6 needs the per-request EM fork this default provides)
* changes what `buildApp()` registers. Building this helper from the same
* `mikroOrmConfig` object production uses means that fix reaches both at
* once; if it is ever done as a hand-edit instead, this helper's 15 e2e
* harnesses would silently stop mirroring production and need the same
* once; if it is ever done as a hand-edit instead, the e2e harnesses built
* on this helper would silently stop mirroring production and need the same
* `allowGlobalContext`-style re-justification `createTestOrm` above got.
*/
// The spread also carries production's `extensions` (Migrator, SeedManager),
// `migrations` and `seeder` settings into the harness; only the driver, the
// database name, the entity list and discovery noise are overridden.
export function createTestMikroOrmModule(db: Database.Database): DynamicModule | Promise<DynamicModule> {
return MikroOrmModule.forRoot({
...mikroOrmConfig,