(
meta: EntityMetadata<Entity>,
filtered: Entity[],
options: Required<EntityLoaderOptions<Entity>>,
)
| 356 | } |
| 357 | |
| 358 | private async populateScalar<Entity extends object>( |
| 359 | meta: EntityMetadata<Entity>, |
| 360 | filtered: Entity[], |
| 361 | options: Required<EntityLoaderOptions<Entity>>, |
| 362 | ) { |
| 363 | const pk = Utils.getPrimaryKeyHash(meta.primaryKeys) as FilterKey<Entity>; |
| 364 | const ids = Utils.unique(filtered.map(e => Utils.getPrimaryKeyValues(e, meta, true))); |
| 365 | const where = this.mergePrimaryCondition<Entity>( |
| 366 | ids as Entity[], |
| 367 | pk, |
| 368 | options, |
| 369 | meta, |
| 370 | this.#metadata, |
| 371 | this.#driver.getPlatform(), |
| 372 | ); |
| 373 | const { filters, convertCustomTypes, lockMode, strategy, populateWhere, connectionType, logging, fields } = options; |
| 374 | |
| 375 | await this.#em.find(meta.class, where as any, { |
| 376 | filters, |
| 377 | convertCustomTypes, |
| 378 | lockMode, |
| 379 | strategy, |
| 380 | populateWhere, |
| 381 | connectionType, |
| 382 | logging, |
| 383 | fields: fields as never[], |
| 384 | populate: [], |
| 385 | }); |
| 386 | } |
| 387 | |
| 388 | private async populatePolymorphic<Entity extends object>( |
| 389 | entities: Entity[], |
no test coverage detected