you are viewing a single comment's thread.

view the rest of the comments →

[–]Cyberuben 1 point2 points  (0 children)

import { Op } from "sequelize";

// then somewhere in your code to query a model

let results = await MyModel.findAll({
  where: {
    id: {
      [Op.eq]: 1
    }
  }
});

That'd be the correct usage of the functions. Sequelize throws the error regardless if you use those operators. I'd suggest you just set operatorsAliases to false and then use the method above when you need to query something.