-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUG] - MSSQL - bulkCreate on BigInt fields fails #15411
Comments
Just FYI, this is available in Sequelize 7 thanks to #14485 :) In the meantime, you can convert the bigint to a string, that's what sequelize used before bigint were a thing in JS |
Hello @ephys, thanks for the information! As for the conversion it will require us to modify the codebase in more than 100 functions to just to handle a cast that could be centralised on sequelize side. I'm available to open a PR if it will speedup the resolution :) |
That would definitely speed things up :) If you're willing to port #14485 to our v6 branch, I'll make sure to review it in a timely manner |
🎉 This issue has been resolved in version 6.27.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thanks for working on this! |
Issue Creation Checklist
Bug Description
Reproducible Example
Here is the link to the SSCCE for this issue:
sequelize/sequelize-sscce#242
What do you expect to happen?
the bulkCreate method should complete the operation.
What is actually happening?
The operation is failing because the bigint primitive is not well handled by the escape function in
sql-string.js
helper.Adding a
case
statement on top of the existingnumber
management would solve the issue because it will generate a correct SQL statement by removing then
at the end. (reference)before
after
Environment
Would you be willing to resolve this issue by submitting a Pull Request?
I can open a PR but I need assistance on how manage the automatic testing (if required)
Indicate your interest in the resolution of this issue by adding the 👍 reaction. Comments such as "+1" will be removed.
The text was updated successfully, but these errors were encountered: