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
We tried to update the id (primary key) of a model.
model.forge({id: 1}).save({id: 2}, {method: 'update'})
I get this error:
error Error: Empty .update() call detected! Update data does not contain any values to update. This will result in a faulty query. Table: DeviceInstances. Columns: . at QueryCompiler_MySQL._prepUpdate (server/node_modules/knex/lib/query/compiler.js:822:13) at QueryCompiler_MySQL.update (server/node_modules/knex/lib/dialects/mysql/query/compiler.js:24:26) at QueryCompiler_MySQL.toSQL (server/node_modules/knex/lib/query/compiler.js:64:29) at Builder.toSQL (server/node_modules/knex/lib/query/builder.js:77:44) at server/node_modules/knex/lib/runner.js:31:36 at server/node_modules/knex/lib/runner.js:260:24
we also experimented with {patch: true} and {required: false} No Luck
{patch: true}
{required: false}
it should perform this SQL statement:
UPDATE model SET id=2 WHERE id = 1
Error. See above
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Introduction
We tried to update the id (primary key) of a model.
Issue Description
I get this error:
we also experimented with
{patch: true}
and{required: false}
No Luck
Steps to reproduce issue
Expected behaviour
it should perform this SQL statement:
Actual behaviour
Error. See above
The text was updated successfully, but these errors were encountered: