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 DriverUtils.buildDriverOptions #3442

Merged
merged 1 commit into from
Jan 18, 2019
Merged

Fix DriverUtils.buildDriverOptions #3442

merged 1 commit into from
Jan 18, 2019

Conversation

jussikinnula
Copy link
Contributor

Fix DriverUtils.buildDriverOptions static method to actually assign TYPEORM_URL originated parameters. There has been couple of past PR's for this, so now it's better to make it simpler with only one way to get the parameters.

The new logic assigns parameters by default from the options values, and secondly from parsed TYPEORM_URL originated parameters. Finally the parsed parameters are assigned on top of options.

src/driver/DriverUtils.ts Outdated Show resolved Hide resolved
};
return Object.assign(urlDriverOptions, options);
}
urlDriverOptions.sid = parsedUrl.database
Copy link

Choose a reason for hiding this comment

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

Suggested change
urlDriverOptions.sid = parsedUrl.database
urlDriverOptions.sid = parsedUrl.database;

src/driver/DriverUtils.ts Outdated Show resolved Hide resolved
@pleerock pleerock merged commit b207d25 into typeorm:master Jan 18, 2019
@pleerock
Copy link
Member

Thank you. Would be great to have a test coverage for this functionality to prevent issues in the future.

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

Successfully merging this pull request may close these issues.

None yet

3 participants