Skip to content

Commit

Permalink
feat(repository): add capability for insert multiple rows in single q…
Browse files Browse the repository at this point in the history
…uery

fix loopbackio#3357

Signed-off-by: Samarpan Bhattacharya <this.is.samy@gmail.com>
  • Loading branch information
samarpanB committed Sep 25, 2022
1 parent 029f0e8 commit 8c05769
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -499,7 +499,9 @@ export class DefaultCrudRepository<
const data = await Promise.all(
entities.map(e => this.entityToData(e, options)),
);
const models = await ensurePromise(this.modelClass.create(data, options));
const models = await ensurePromise(
this.modelClass.createAll(data, options),
);
return this.toEntities(models);
}

Expand Down

0 comments on commit 8c05769

Please sign in to comment.