Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeORM predefined connection object #579

Closed
marghidanu opened this issue Jun 25, 2019 · 2 comments · Fixed by #590
Closed

TypeORM predefined connection object #579

marghidanu opened this issue Jun 25, 2019 · 2 comments · Fixed by #590

Comments

@marghidanu
Copy link

Information

  • Version: 5.x
  • Type: Issue

Description

Hello,

We are trying to create a test with supertest that uses two instances of ServerLoader apps both using the same database. The problem is that TypeORM manages connections is some sort of a Singleton object thus causing the application to fail silently. It would be nice if TypeORMService would check if the connection already exists using getConnection(name) from TypeORM and if the connection already exists it should reuse it.

@Romakita
Copy link
Collaborator

Hello @marghidanu,
Can you help me by creating a small PR with the required change (or copy paste here the code) ? I'll doing unit test for you ^^
Here the TypeORMService code https://github.com/TypedProject/ts-express-decorators/blob/master/packages/typeorm/src/services/TypeORMService.ts
See you
Romain

@Romakita
Copy link
Collaborator

🎉 This issue has been resolved in version 5.27.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants