We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello friends,
I got the following error when trying set timestamp column (it's allows NULL) to NULL.
Potentially unhandled rejection [1] Error: ER_TRUNCATED_WRONG_VALUE: Incorrect datetime value: 'NULL' for column 'added_to_queue_at' at row 1
When trying to call the following code:
model.added_to_queue_at = null; model.save();
The following code isn't work either:
model.added_to_queue_at = undefined; model.save();
Schema:
let Word = Schema.define('Word', { id: { type: Number }, added_to_queue_at: { type: Date, dataType: 'timestamp', allowNull: true, null: true, default: () => { return null;} } }, { table: 'word' });
In the current version of node-mysql it works fine with undefined:
node-mysql
connection.query('UPDATE `words` SET `added_to_queue_at` = ? WHERE id = ?', [ undefined, 18 ], function(err, results) { console.error(err); console.log(results); });
The text was updated successfully, but these errors were encountered:
For now I'm using the following workaround:
Word.update({ where: { id: word.id }, update: { added_to_queue_at: undefined } });
Sorry, something went wrong.
1602
No branches or pull requests
Hello friends,
I got the following error when trying set timestamp column (it's allows NULL) to NULL.
When trying to call the following code:
The following code isn't work either:
Schema:
In the current version of
node-mysql
it works fine with undefined:The text was updated successfully, but these errors were encountered: