You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executing (default): DELETE FROM "tokens" WHERE "token" = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEsImlhdCI6MTY0NzI3Njc5NiwiZXhwIjoxNjQ5ODY1MTk2LCJ0eXBlIjoicmVmcmVzaCJ9.AVaZzOjALodjIeSud4lpSHSyb76nLN6h8PixtIMx61M' AND "tokenType" = 'refresh' AND "blocklisted" = false
Error
at Query.run (E:\workspace\p4w\p4wserver\node_modules\sequelize\lib\dialects\postgres\query.js:50:25)
at E:\workspace\p4w\p4wserver\node_modules\sequelize\lib\sequelize.js:313:28
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async PostgresQueryInterface.delete (E:\workspace\p4w\p4wserver\node_modules\sequelize\lib\dialects\abstract\query-interface.js:382:12)
at async model.destroy (E:\workspace\p4w\p4wserver\node_modules\sequelize\lib\model.js:2542:16)
at async Object.logout (E:\workspace\p4w\p4wserver\services\auth.service.js:34:3)
at async E:\workspace\p4w\p4wserver\controllers\auth.controller.js:19:3 {
name: 'SequelizeDatabaseError',
parent: error: column "tokenType" does not exist
at Parser.parseErrorMessage (E:\workspace\p4w\p4wserver\node_modules\pg-protocol\dist\parser.js:287:98)
at Parser.handlePacket (E:\workspace\p4w\p4wserver\node_modules\pg-protocol\dist\parser.js:126:29)
at Parser.parse (E:\workspace\p4w\p4wserver\node_modules\pg-protocol\dist\parser.js:39:38)
at Socket.<anonymous> (E:\workspace\p4w\p4wserver\node_modules\pg-protocol\dist\index.js:11:42)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:199:23) {
length: 237,
severity: 'ERROR',
code: '42703',
detail: undefined,
hint: 'Perhaps you meant to reference the column "tokens.token_type".',
position: '206',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'd:\\pginstaller_13.auto\\postgres.windows-x64\\src\\backend\\parser\\parse_relation.c',
line: '3513',
routine: 'errorMissingColumn',
sql: `DELETE FROM "tokens" WHERE "token" = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEsImlhdCI6MTY0NzI3Njc5NiwiZXhwIjoxNjQ5ODY1MTk2LCJ0eXBlIjoicmVmcmVzaCJ9.AVaZzOjALodjIeSud4lpSHSyb76nLN6h8PixtIMx61M' AND "tokenType" = 'refresh' AND "blocklisted" = false`,
parameters: undefined
},
original: error: column "tokenType" does not exist
at Parser.parseErrorMessage (E:\workspace\p4w\p4wserver\node_modules\pg-protocol\dist\parser.js:287:98)
at Parser.handlePacket (E:\workspace\p4w\p4wserver\node_modules\pg-protocol\dist\parser.js:126:29)
at Parser.parse (E:\workspace\p4w\p4wserver\node_modules\pg-protocol\dist\parser.js:39:38)
at Socket.<anonymous> (E:\workspace\p4w\p4wserver\node_modules\pg-protocol\dist\index.js:11:42)
at Socket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:199:23) {
length: 237,
severity: 'ERROR',
code: '42703',
detail: undefined,
**hint: 'Perhaps you meant to reference the column "tokens.token_type".',**
position: '206',
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'd:\\pginstaller_13.auto\\postgres.windows-x64\\src\\backend\\parser\\parse_relation.c',
line: '3513',
routine: 'errorMissingColumn',
sql: `DELETE FROM "tokens" WHERE "token" = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEsImlhdCI6MTY0NzI3Njc5NiwiZXhwIjoxNjQ5ODY1MTk2LCJ0eXBlIjoicmVmcmVzaCJ9.AVaZzOjALodjIeSud4lpSHSyb76nLN6h8PixtIMx61M' AND "tokenType" = 'refresh' AND "blocklisted" = false`,
parameters: undefined
},
sql: `DELETE FROM "tokens" WHERE "token" = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEsImlhdCI6MTY0NzI3Njc5NiwiZXhwIjoxNjQ5ODY1MTk2LCJ0eXBlIjoicmVmcmVzaCJ9.AVaZzOjALodjIeSud4lpSHSyb76nLN6h8PixtIMx61M' AND "tokenType"
= 'refresh' AND "blocklisted" = false`,
parameters: {}
}
Kindly help me in fixing this issue.
Additional context
Add any other context or screenshots about the issue here.
Issue Template Checklist
Is this issue dialect-specific?
No. This issue is relevant to Sequelize as a whole.
Yes. This issue only applies to the following dialect(s): XXX, YYY, ZZZ
I don't know.
Would you be willing to resolve this issue by submitting a Pull Request?
Yes, I have the time and I know how to start.
Yes, I have the time but I don't know how to start, I would need guidance.
No, I don't have the time, although I believe I could do it if I had the time...
No, I don't have the time and I wouldn't even know how to start.
The text was updated successfully, but these errors were encountered:
Issue Creation Checklist
[ X] I have read the contribution guidelines
Issue Description
I am using with postgresal dialact, sequelize version is 6.14.0 for nodejs
The model is defined with underscored: true
findOne() method correctly convert the field name from camel case to snake case and return the instance.
when I call destroy() of the instance, it execute query with camel case field which case the error.
on findOne() method call:
on destroy() method call:
Kindly help me in fixing this issue.
Additional context
Add any other context or screenshots about the issue here.
Issue Template Checklist
Is this issue dialect-specific?
Would you be willing to resolve this issue by submitting a Pull Request?
The text was updated successfully, but these errors were encountered: