We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$or doesn't work in any syntax form. (f.i. https://stackoverflow.com/questions/20695062/sequelize-or-condition-object)
const addAssociation = (context) => { const demos = context.app.services['demos'].Model; context.params.sequelize = { raw: false, where: { $or: [{ isVisible: true }, { isValid: true }] }, attributes: { as: 'demos', include: helperDemos } }; delete context.params.query.include; return Promise.resolve(context); };
------------------------------ Server response: { "name": "GeneralError", "message": "Invalid value { isVisible: true }", "code": 500, "className": "general-error", "data": {}, "errors": {} } ### Expected behavior The query should perform a simple 'or' operation. ### System configuration "@feathersjs/authentication": "^2.1.16", "@feathersjs/authentication-jwt": "^2.0.10", "@feathersjs/authentication-local": "^1.2.9", "@feathersjs/authentication-oauth2": "^1.3.1", "@feathersjs/configuration": "^2.0.6", "@feathersjs/errors": "^3.3.6", "@feathersjs/express": "^1.3.1", "@feathersjs/feathers": "^3.3.1", "compression": "^1.7.4", "cors": "^2.8.5", "feathers-authentication-hooks": "^0.3.1", "feathers-authentication-management": "^2.0.1", "feathers-hooks-common": "^4.20.7", "feathers-mailer": "^3.0.1", "feathers-sequelize": "^4.1.1", "helmet": "^3.18.0", "multer": "^1.4.1", "nodemailer-smtp-transport": "^2.7.4", "passport-google-oauth20": "^1.0.0", "pg": "^7.10.0", "sequelize": "^4.44.0", "serve-favicon": "^2.5.0", "winston": "^3.2.1" **NodeJS version**: ^10 **Operating System**: Mac
The text was updated successfully, but these errors were encountered:
$or is only supported by the Feathers common query syntax passed via params.query. When using params.sequelize you need to use Sequelize operators ([Op.or]: [])
$or
params.query
params.sequelize
[Op.or]: []
Sorry, something went wrong.
No branches or pull requests
$or doesn't work in any syntax form. (f.i. https://stackoverflow.com/questions/20695062/sequelize-or-condition-object)
Snippet
const addAssociation = (context) => { const demos = context.app.services['demos'].Model; context.params.sequelize = { raw: false, where: { $or: [{ isVisible: true }, { isValid: true }] }, attributes: { as: 'demos', include: helperDemos } }; delete context.params.query.include; return Promise.resolve(context); };
The text was updated successfully, but these errors were encountered: