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

Support of ON DUPLICATE KEY for 'bulkCreate' method (only supported by mysql & mariadb) #2692

Merged
merged 3 commits into from Dec 9, 2014

Conversation

jcombes
Copy link
Contributor

@jcombes jcombes commented Dec 8, 2014

No description provided.

@@ -197,13 +198,21 @@ module.exports = (function() {
')');
}.bind(this));

if (options && options.updateOnDuplicate instanceof Array && options.updateOnDuplicate.length) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this shouldn't update the createdAt timestamp.

I know you copied the code from usert, so the bug exists there as well ;) #2668

Copy link
Member

Choose a reason for hiding this comment

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

Oh the fields are specified by an array. Disregard that comment then, I though you defaulted to all fields :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Would probably make sense to support true defaulting to all fields aswell.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK to support all fields by default.

@jcombes
Copy link
Contributor Author

jcombes commented Dec 8, 2014

Have you other comments?
Do you agree with the modifications?

janmeier added a commit that referenced this pull request Dec 9, 2014
Support of ON DUPLICATE KEY for 'bulkCreate' method (only supported by mysql & mariadb)
@janmeier janmeier merged commit f8cf8dc into sequelize:master Dec 9, 2014
@janmeier
Copy link
Member

janmeier commented Dec 9, 2014

Thanks :)

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