Skip to content

Commit

Permalink
fix: test for typeorm#4165
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Dobell committed Jan 13, 2020
1 parent e601b27 commit 98e01d0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/query-builder/QueryExpressionMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ export class QueryExpressionMap {
map.callObservers = this.callObservers;
map.useTransaction = this.useTransaction;
map.nativeParameters = Object.assign({}, this.nativeParameters);
map.eagerRelations = this.eagerRelations;
return map;
}

Expand Down
4 changes: 3 additions & 1 deletion test/github-issues/4156/issue-4156.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ describe("github issues > #4156 QueryExpressionMap doesn't clone all values corr
await prepareData(connection);

const qb = connection.manager
.createQueryBuilder("Post", "post");
.createQueryBuilder("Post", "post")
.disableEagerRelations(true);

const [loadedPost1, loadedPost2] = await Promise.all([
qb.clone().where({ id: 1 }).getOne(),
Expand All @@ -62,6 +63,7 @@ describe("github issues > #4156 QueryExpressionMap doesn't clone all values corr

const qb = connection.manager
.createQueryBuilder("Post", "post")
.disableEagerRelations(true)
.where({ id: 1 });

const [loadedPost1, loadedPost2] = await Promise.all([
Expand Down

0 comments on commit 98e01d0

Please sign in to comment.