revert: "fix: connection Reuse is broken in a Lambda environment: (#4804)" #5486
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This reverts commit 7962036
The original PR came about from this issue: #3427.
The author of the original issue has since realized the root problem they were facing was unrelated: #3427 (comment)
It seems this "monkeypatch" is causing more problems than any workaround it might have provided is worth. The conditional
metadata.target.name === target.name
in thefindMetadata
function is not a thorough-enough comparison. Function names are often the same in large codebases and especially in minified code (as @Benjamin-Dobell points out #4804 (comment)). This results in false positives returned fromthis.entityMetadatas.find()
depending on the order of theEntityMetadata
in the array.Closes:
#4958 TypeORM 0.2.20 getRepository returns results from another Repo.
#4967 0.2.20 release breaks entity repo resolving mechanism