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

hasOne now prefer for options.as foreign key name #5926

Merged
merged 2 commits into from May 24, 2016
Merged

hasOne now prefer for options.as foreign key name #5926

merged 2 commits into from May 24, 2016

Conversation

sushantdhiman
Copy link
Contributor

Pull Request check-list

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does your issue contain a link to existing issue or a description of the issue you are solving?
  • Have you added an entry under Future in the changelog?

Description of change

Closes #5247

hasOne was not using the options.as alias for generating foreign key names. Now it does :)

cc @janmeier

@@ -10,6 +10,7 @@
- [FIXED] Trigger afterCreate hook after all nested includes (for hasMany or belongsToMany associations) have been created to be consistent with hasOne.
- [REMOVED] Support for `pool:false`
- [REMOVED] Default transaction isolation level [#5094](https://github.com/sequelize/sequelize/issues/5094)
- [CHANGED] `hasOne` now prefer aliases to construct foreign key [#5247](https://github.com/sequelize/sequelize/issues/5247)
Copy link
Member

Choose a reason for hiding this comment

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

Should be a buxfix me thinks

@janmeier
Copy link
Member

LGTM, I think this is the correct behaviour - Mind adding a unit test ?

@sushantdhiman
Copy link
Contributor Author

Done @janmeier

@janmeier janmeier merged commit 7579d2a into sequelize:master May 24, 2016
@sushantdhiman sushantdhiman deleted the task-5247 branch May 24, 2016 08:46
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

2 participants