diff --git a/src/db/ModelRelation.ts b/src/db/ModelRelation.ts index bc6a39e..13f7684 100644 --- a/src/db/ModelRelation.ts +++ b/src/db/ModelRelation.ts @@ -145,7 +145,7 @@ export class ManyModelRelation extends ModelRe } public async populate(models: ModelQueryResult): Promise { - this.cachedModels = models.filter(m => m[this.dbProperties.foreignKey] === this.getModelID); + this.cachedModels = models.filter(m => m[this.dbProperties.foreignKey] === this.getModelID()); } }