Skip to content

Commit 85fa9c6

Browse files
authored
fix: explicitly define property for entity relation as enumerable (typeorm#9437)
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: typeorm#6631
1 parent 4a36d0e commit 85fa9c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/query-builder/RelationLoader.ts

+1
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ export class RelationLoader {
448448
}
449449
},
450450
configurable: true,
451+
enumerable: false,
451452
})
452453
}
453454
}

0 commit comments

Comments
 (0)