大家好,我是Sequelize和Node js的初学者, 我已阅读他们的官方文档,阅读他们的github,搜索博客文章,无法解决它。 我经常收到警告信息:
GMT sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators at node_modules/sequelize/lib/sequelize.js:236:13
此错误仅在运行迁移时发生,但在正常启动服务器
时不会发生这种情况Herei是我的connection.js文件
答案 0 :(得分:1)
所以我用Google搜索了几天,这是答案: 像这样连接到数据库时,操作员同盟必须设置为false:
sequelize = new Sequelize(config.database, config.username, config.password, Object.assign({}, config, {
pool: dbConst.pool,
operatorsAliases: false,
})
还必须在migrations.config.json中将operatorAliases设置为false 并且在您的代码中始终使用Sequalize.Op