Woodshop tutorial break sv7

https://docs.forestadmin.com/woodshop/how-tos/make-filters-case-insensitive

Once we enable this, all search breaks.

SequelizeDatabaseError: column User.$or does not exist
    at Query.formatError (/Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/dialects/postgres/query.js:366:16)
    at /Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/dialects/postgres/query.js:72:18
From previous event:
    at Query.run (/Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/dialects/postgres/query.js:64:23)
    at /Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/sequelize.js:655:29
From previous event:
    at /Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/sequelize.js:655:12
From previous event:
    at /Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/sequelize.js:651:10
    at /Users/austin/Dev/RupieNetwork/node_modules/retry-as-promised/index.js:70:21
    at new Promise (<anonymous>)
    at retryAsPromised (/Users/austin/Dev/RupieNetwork/node_modules/retry-as-promised/index.js:60:10)
    at /Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/sequelize.js:641:30
From previous event:
    at Sequelize.query (/Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/sequelize.js:590:23)
    at QueryInterface.select (/Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/query-interface.js:1126:27)
    at /Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/model.js:1759:34
    at bound (node:domain:416:15)
    at runBound (node:domain:427:12)
    at processImmediate (node:internal/timers:464:21)
    at process.topLevelDomainCallback (node:domain:147:15)
    at process.callbackTrampoline (node:internal/async_hooks:129:24)
From previous event:
    at Function.findAll (/Users/austin/Dev/RupieNetwork/node_modules/sequelize/lib/model.js:1757:8)
    at ResourcesGetter._getRecords (/Users/austin/Dev/RupieNetwork/node_modules/forest-express-sequelize/dist/services/resources-getter.js:54:33)
    at ResourcesGetter.perform (/Users/austin/Dev/RupieNetwork/node_modules/forest-express-sequelize/dist/services/resources-getter.js:35:13)
[forest] 🌳🌳🌳  Cannot search properly on Smart Field roleCannot read property '0' of undefined

Hello @austinrupie,

Sorry for the delay. I think we missed this one.
Thanks for the heads-up. I’ve made a feedback to the team, we will investigate this.

Regards,
Morgan

Hey @austinrupie,

I case you needed this bit of code. Here is the new version. We will update the documentation A.S.A.P.

const Sequelize = require('sequelize');
const Operators = require('forest-express-sequelize/dist/utils/operators');

// Operators has change to a Singleton so we need to change the way we get an instance
const operators = Operators.getInstance({ Sequelize: Sequelize });
operators.LIKE = Sequelize.Op.iLike;

Again, thank you. :slight_smile:

Best regards,
Morgan