ModelQuery: fix passing missing connection parameter

This commit is contained in:
Alice Gaudon 2020-09-04 15:10:11 +02:00
parent 19aafc76bf
commit 1dd22f618c
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ export default class ModelQuery<M extends Model> {
}
public async get(connection?: Connection): Promise<ModelQueryResult<M>> {
const queryResult = await this.execute();
const queryResult = await this.execute(connection);
const models: ModelQueryResult<M> = [];
if (this._pivot) models.pivot = [];