Skip to content

Commit

Permalink
v1.2.2 - shallow copy pre-save so that there's no doubly marshalled cols
Browse files Browse the repository at this point in the history
  • Loading branch information
Helveg committed Oct 23, 2024
1 parent 16d09ac commit 858b66f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/seeders/class-seeder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class ClassSeeder<
const refs = pilferReferences(records);
ctx.unresolvedReferences = ctx.unresolvedReferences.concat(refs);
this.logger.debug(`Saving records ...`);
let saved = await repo.save(records);
let saved = await repo.save(records.map(r => ({...r})));
ctx.savedEntities.set(this.seedClass, saved);
this.logger.debug(`Saved.`);
const resolvePromises = [];
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nestjs-class-seeder",
"version": "1.2.1",
"version": "1.2.2",
"description": "An extension library for NestJS to perform seeding. Forked from nestjs-seeder",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down

0 comments on commit 858b66f

Please sign in to comment.