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

fix,feat: support MongoDB DNS seed list connection #7136

Merged
merged 1 commit into from
Dec 22, 2020

Conversation

nocheintobi
Copy link
Contributor

@nocheintobi nocheintobi commented Dec 2, 2020

As described in MongoDB Docs, an additional connection string format called DNS Seed List Connection format can be used. As this is the default format for MongoDB Atlas, the hosted service of MongoDB, this should be available also for typeorm.
The connection format is identified by the url-schema "mongodb+srv" and does not allow specifying a port.

Description of change

When using the DNS seed connection list format, mongodb+srv must be used as URL schema and a port must not be provided!
Can simply be verified with a free account of MongoDB Atlas, where this connection format is the default when using MongoDB driver 3.6+

Fixes #3347
Fixes #3133
Fixes #7009

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run lint passes with this change
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change N/A
  • Documentation has been updated to reflect this change N/A
  • The new commits follow conventions explained in CONTRIBUTING.md

As described in [MongoDB Docs](https://docs.mongodb.com/manual/reference/connection-string/#dns-seed-list-connection-format), an additional connection string format called DNS Seed List Connection format can be used. As this is the default format for MongoDB Atlas, the hosted service of MongoDB, this should be available also for typeorm. 
The connection format is identified by the url-schema "mongodb+srv" and does not allow specifying a port.
Fixes typeorm#3347
Fixes typeorm#3133
Copy link

@PurpleEyeGH PurpleEyeGH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's works, thank you so much.

@PierBusDev
Copy link

This should be merged asap.

@Lectem
Copy link

Lectem commented Dec 14, 2020

Could this be merged ?
We had to revert to an older version of typeorm because of this.

@mnlfischer
Copy link

Please merge and release.

@nebkat
Copy link
Contributor

nebkat commented Dec 20, 2020

This hasn't been rejected, the maintainers just haven't gotten around to merging it, and more comments won't make it any faster. Use the 👍 on the original PR instead of spamming.

@pleerock pleerock merged commit f730bb9 into typeorm:master Dec 22, 2020
@pleerock
Copy link
Member

Thank you contribution and sorry for waiting! Fix will be available in v0.2.30 later this week.

@5d-jh
Copy link

5d-jh commented Dec 23, 2020

@pleerock Thanks. Can we know the exact date?

@kennhung
Copy link

Dose this support ssl=false parameter?

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