diff --git a/packages/repository/src/repositories/legacy-juggler-bridge.ts b/packages/repository/src/repositories/legacy-juggler-bridge.ts index 5667e798eb1f..bd69f5d28314 100644 --- a/packages/repository/src/repositories/legacy-juggler-bridge.ts +++ b/packages/repository/src/repositories/legacy-juggler-bridge.ts @@ -23,16 +23,16 @@ import { BelongsToDefinition, createBelongsToAccessor, createHasManyRepositoryFactory, + createHasManyThroughRepositoryFactory, createHasOneRepositoryFactory, HasManyDefinition, HasManyRepositoryFactory, + HasManyThroughDefinition, + HasManyThroughRepositoryFactory, HasOneDefinition, HasOneRepositoryFactory, includeRelatedModels, InclusionResolver, - HasManyThroughDefinition, - HasManyThroughRepositoryFactory, - createHasManyThroughRepositoryFactory, } from '../relations'; import {IsolationLevel, Transaction} from '../transaction'; import {isTypeResolver, resolveType} from '../type-resolver'; @@ -269,7 +269,8 @@ export class DefaultCrudRepository< TargetEntiy extends Entity, TargetID, ThroughEntity extends Entity, - ThroughID + ThroughID, + ForeignKeyType >( relationName: string, targetRepositoryGetter: Getter>, @@ -280,14 +281,15 @@ export class DefaultCrudRepository< TargetEntiy, TargetID, ThroughEntity, - ThroughID + ForeignKeyType > { const meta = this.entityClass.definition.relations[relationName]; return createHasManyThroughRepositoryFactory< TargetEntiy, TargetID, ThroughEntity, - ThroughID + ThroughID, + ForeignKeyType >( meta as HasManyThroughDefinition, targetRepositoryGetter,