We are trying to upgrade sequelize from v4.42.0/v4.44.4 to v5.22.3 and are using mysql2 v1.6.5/v1.6.6
Basically we are trying to insert a record into the mysql database and thats when we received the above error in upgraded version. However, we are seeing below error:
"SequelizeDatabaseError: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[object Object]' at line 2\n
at Query.formatError (/opt/app/node_modules/sequelize/lib/dialects/mysql/query.js:244:16)\n
at Query.handler [as onResult] (/opt/app/node_modules/sequelize/lib/dialects/mysql/query.js:51:23)\n
at Query.execute (/opt/app/node_modules/mysql2/lib/commands/command.js:30:14)\n
at Connection.handlePacket (/opt/app/node_modules/mysql2/lib/connection.js:408:32)\n
at PacketParser.onPacket (/opt/app/node_modules/mysql2/lib/connection.js:70:12)\n
at PacketParser.executeStart (/opt/app/node_modules/mysql2/lib/packet_parser.js:75:16)\n
at TLSSocket.<anonymous> (/opt/app/node_modules/mysql2/lib/connection.js:328:25)\n
at TLSSocket.emit (events.js:310:20)\n
at TLSSocket.EventEmitter.emit (domain.js:482:12)\n
at addChunk (_stream_readable.js:286:12)\n
at readableAddChunk (_stream_readable.js:268:9)\n
at TLSSocket.Readable.push (_stream_readable.js:209:10)\n
at TLSWrap.onStreamRead (internal/stream_base_commons.js:186:23)",
"message": "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[object Object]' at line 2"
We have enabled to log all function call parameters for troubleshooting and please find attached logs with details. Could someone please help me understand the issue here or any pointers/support would be appreciated as well ?
Thanks in advance for the help.
Pavan.