Skip to content

Commit

Permalink
fix: explicitly define property for entity relation as enumerable (#9437
Browse files Browse the repository at this point in the history
)

In some environments it seems like entity object was created with columns values set to undefined, thus Object.defineProperty uses already defined value for enumerable - true.
    Which leads to RawSqlResultsToEntityTransformer.transform() run getters on relation fields (as they were enumerable) resolving the promises - running queries which eventually leads to the Free memory exhaustion on the machine :)

    Closes: #6631
  • Loading branch information
orcwarrior committed Nov 5, 2022
1 parent 4a36d0e commit 85fa9c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/query-builder/RelationLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ export class RelationLoader {
}
},
configurable: true,
enumerable: false,
})
}
}

0 comments on commit 85fa9c6

Please sign in to comment.