return options.model.findOne({
// $or: [{id: req.params.id}, {key: req.params.id}],
where: {id: req.params.id},
})
I am trying to get the $or to work properly, and for the most part it does. However, if I pass in a fake value (one that doesn't exist in my DB) the $or still returns a value, while the where does not.
I looked at http://docs.sequelizejs.com/en/latest/docs/querying/
Though it really doesn't offer to much help on the $or operator. Anybody experienced this and know a good work around?