-
-
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
Unable to insert/upsert record in MS SQL DB when a composite key has a falsey value #11684
Comments
Hello, thanks for the report.
Are you still up for this? Let me know, thanks |
Yes, I am.... Would love to contribute.... |
Thank you 😬 that's great. The first thing I'd like to ask is for you to take the code you wrote in your first post and make a complete |
@papb i see this has had no traction in quite some time. we are currently hitting this while attempting to use an mssql dialect for |
🎉 This issue has been resolved in version 6.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Issue Description
While inserting a record in MS SQL DB using sequelize, if the table has a group of Primary Keys (Composite key), and the record to be inserted/upserted has a "falsey" value (false/0), then the record is not inserted/upserted.
What are you doing?
I was using sequelize for inserting/ upserting data in MS SQL DB, in which there was a composite key column that has a falsy value (eg. false/0).
It was throwing an error:
Here is the link to the SSCCE for this issue: LINK-HERE
What do you expect to happen?
The record must be upserted in DB.
Output:
:::::successfully saved data to mssql:::::
What is actually happening?
An error is returned stating, we can not skip the value for a primary key.
Returning this error:
Additional context
Add any other context or screenshots about the feature request here.
Environment
Issue Template Checklist
How does this problem relate to dialects?
Would you be willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: