Loads the specified relations on this entity.
(
populate: AutoPath<Entity, Hint, PopulatePath.ALL>[] | false,
options: EntityLoaderOptions<Entity, Fields> = {},
)
| 201 | |
| 202 | /** Loads the specified relations on this entity. */ |
| 203 | async populate<Hint extends string = never, Fields extends string = never>( |
| 204 | populate: AutoPath<Entity, Hint, PopulatePath.ALL>[] | false, |
| 205 | options: EntityLoaderOptions<Entity, Fields> = {}, |
| 206 | ): Promise<Loaded<Entity, Hint>> { |
| 207 | if (!this.__em) { |
| 208 | throw ValidationError.entityNotManaged(this.entity); |
| 209 | } |
| 210 | |
| 211 | // @ts-ignore hard to type |
| 212 | await this.__em.populate(this.entity, populate, options); |
| 213 | |
| 214 | return this.entity as Loaded<Entity, Hint>; |
| 215 | } |
| 216 | |
| 217 | /** Returns whether this entity has a primary key value set. */ |
| 218 | hasPrimaryKey(): boolean { |
nothing calls this directly
no test coverage detected