MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / ref

Method ref

packages/core/src/entity/defineEntity.ts:111–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109 Omit<Options, 'nullable' | 'strictNullable'> & { nullable: true; strictNullable: true }
110 >;
111 ref(): Options extends { lazyRef: true } ? never : PropertyChain<Value, Omit<Options, 'ref'> & { ref: true }>;
112 /**
113 * Mark a to-one relation (`m:1`/`1:1`) as a {@apilink LazyRef} — direct entity at runtime, type-restricted
114 * until `Loaded<>` narrows it. Type-level only, no `ref: true` wrapping. Not compatible with `.ref()` or

Calls

no outgoing calls

Tested by

no test coverage detected