Skip to content

Commit

Permalink
Revert "fix: connection Reuse is broken in a Lambda environment: (typ…
Browse files Browse the repository at this point in the history
…eorm#4804)"

This reverts commit 7962036.
  • Loading branch information
Benjamin-Dobell committed Jan 30, 2020
1 parent 9dca8a3 commit 90ff0e4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/connection/Connection.ts
Expand Up @@ -497,12 +497,8 @@ export class Connection {
*/
protected findMetadata(target: Function|EntitySchema<any>|string): EntityMetadata|undefined {
return this.entityMetadatas.find(metadata => {
if (typeof metadata.target === "function" && typeof target === "function" && metadata.target.name === target.name) {
if (metadata.target === target)
return true;
}
if (metadata.target === target) {
return true;
}
if (target instanceof EntitySchema) {
return metadata.name === target.options.name;
}
Expand Down

0 comments on commit 90ff0e4

Please sign in to comment.