{"id":"d8256227170251f4","repo":"sequelize/sequelize","slug":"string-based-operators-have-been-removed-please-u","errorCode":null,"errorMessage":"String based operators have been removed. Please use Symbol operators, read more at https://sequelize.org/docs/v7/core-concepts/model-querying-basics/#deprecated-operator-aliases","messagePattern":"String based operators have been removed\\. Please use Symbol operators, read more at https://sequelize\\.org/docs/v7/core-concepts/model-querying-basics/#deprecated-operator-aliases","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/sequelize-typescript.ts","lineNumber":461,"sourceCode":"    }\n\n    // @ts-expect-error -- sanity check\n    if (options.pool === false) {\n      throw new Error(\n        'Setting the \"pool\" option to \"false\" is not supported since Sequelize 4. To disable the pool, set the \"pool\".\"max\" option to 1.',\n      );\n    }\n\n    // @ts-expect-error -- sanity check\n    if (options.logging === true) {\n      throw new Error(\n        'The \"logging\" option must be set to a function or false, not true. If you want to log all queries, set it to `console.log`.',\n      );\n    }\n\n    // @ts-expect-error -- sanity check\n    if (options.operatorsAliases) {\n      throw new Error(\n        'String based operators have been removed. Please use Symbol operators, read more at https://sequelize.org/docs/v7/core-concepts/model-querying-basics/#deprecated-operator-aliases',\n      );\n    }\n\n    if ('dialectModulePath' in options) {\n      throw new Error(\n        'The \"dialectModulePath\" option has been removed, as it is not compatible with bundlers. Please refer to the documentation of your dialect at https://sequelize.org to learn about the alternative.',\n      );\n    }\n\n    if ('dialectModule' in options) {\n      throw new Error(\n        'The \"dialectModule\" option has been replaced with an equivalent option specific to your dialect. Please refer to the documentation of your dialect at https://sequelize.org to learn about the alternative.',\n      );\n    }\n\n    if ('typeValidation' in options) {\n      throw new Error(","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/sequelize/sequelize/blob/7e1deec499d5afbb8d1877c2f4d545cead1214ec/packages/core/src/sequelize-typescript.ts#L443-L479","documentation":"String-based operator aliases (e.g. $gt, $like) and the operatorsAliases option were removed in Sequelize v7. Operators must be Symbol members of the Op object (Op.gt, Op.like, etc.).","triggerScenarios":"Passing the operatorsAliases option, or using string operators in where clauses like { age: { $gt: 18 } }.","commonSituations":"v5/v6 query code; tutorials using $-prefixed operators.","solutions":["Remove the operatorsAliases option entirely.","Replace string operators with Op.* symbols: { age: { [Op.gt]: 18 } }."],"exampleFix":"// before\nnew Sequelize({ operatorsAliases: { $gt: Op.gt } });\nUser.findAll({ where: { age: { $gt: 18 } } });\n\n// after\nimport { Op } from '@sequelize/core';\nUser.findAll({ where: { age: { [Op.gt]: 18 } } });","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always use Op.* symbol operators.","Codemod $-prefixed operators during upgrade."],"tags":["sequelize","operators","migration","v7"],"analyzedSha":"7e1deec499d5afbb8d1877c2f4d545cead1214ec","analyzedAt":"2026-08-03T18:58:44.549Z","schemaVersion":2}