1 | import { Entity } from '../../model';
|
2 | import { EntityCrudRepository } from '../../repositories/repository';
|
3 | import { Getter, InclusionResolver, ReferencesManyDefinition } from '../relation.types';
|
4 | export interface ReferencesManyAccessor<Target extends Entity, SourceId> {
|
5 | |
6 |
|
7 |
|
8 | (sourceId: SourceId): Promise<Target>;
|
9 | |
10 |
|
11 |
|
12 | inclusionResolver: InclusionResolver<Entity, Target>;
|
13 | }
|
14 |
|
15 |
|
16 |
|
17 | export declare function createReferencesManyAccessor<Target extends Entity, TargetIds, Source extends Entity, SourceId>(referencesManyMetadata: ReferencesManyDefinition, targetRepoGetter: Getter<EntityCrudRepository<Target, TargetIds>>, sourceRepository: EntityCrudRepository<Source, SourceId>): ReferencesManyAccessor<Target, SourceId>;
|