Binds this scalar reference to a specific entity and property for lazy loading support.
(entity: Entity, property: EntityKey<Entity>)
| 314 | |
| 315 | /** Binds this scalar reference to a specific entity and property for lazy loading support. */ |
| 316 | bind<Entity extends object>(entity: Entity, property: EntityKey<Entity>): void { |
| 317 | this.entity = entity; |
| 318 | this.#property = property; |
| 319 | Object.defineProperty(this, 'entity', { enumerable: false, value: entity }); |
| 320 | } |
| 321 | |
| 322 | /** Returns the current scalar value, or undefined if not yet loaded. */ |
| 323 | unwrap(): Value | undefined { |
no outgoing calls
no test coverage detected