Fails with operatorsAliases: false
liquidautumn opened this issue · 5 comments
We have operator aliases turned off in out project due to deprecation warning and dataloader-sequelize fails, cause it uses them internally. PR following.
While trying to quickly replace aliases with Sequelize.Op.and I realized that Op namespace was introduced with sequelize v4 and this lib aim is to support v3 as well, what is the preferred way to handle it?
If you do something like this
const { Op } = Sequelize; const operatorsAliases = {};
and pass operatorsAliases to the Sequelize constructor the error will vanish and you will load no operator aliases into sequelize.
This method allows you to, down the road, add operators from OP into the empty object as needed
Sorry for the slow response.
We could simply do something like const $and = Op.and || '$and'
and then use [$and]
in place of $and
in the few places we use it.
@liquidautumn this was addressed in #52 and #53, released in v1.7.2.
@mickhansen I think we can close this ticket now.
Thanks @znarf