title: Sequelize - Cannot read property 'getQueryInterface' of undefined
body: <p>Here's hoping someone can point me in the right direction. I have a table of "trigger" words that trigger certain behaviors in my app. The app has been running for some months now, but <em>sometimes</em>, during a call to <code>findAll</code>, the following error occurs: </p>
  
  <pre><code>TypeError: Cannot read property 'getQueryInterface' of undefined
      at Model.get (C:\Users\Me\Projects\api\project-name-api\node_modules\sequelize\lib\model.js:104:40)
      at Model.get (C:\Users\Me\Projects\api\project-name-api\node_modules\sequelize\lib\model.js:110:17)
      at Model.getTableName (C:\Users\Me\Projects\api\project-name-api\node_modules\sequelize\lib\model.js:1087:15)
      at Model.findAll (C:\Users\Me\Projects\api\project-name-api\node_modules\sequelize\lib\model.js:1350:19)
      at getSession.then.s (C:\Users\Me\Projects\api\project-name-api\lib\message-interpreter.js:148:15)
  </code></pre>
  
  <p>It also stops the app from running.</p>
  
  <pre><code>AssertionError [ERR_ASSERTION]: false == true
      at Timer.listOnTimeout (timers.js:280:3)
  </code></pre>
  
  <p>(Is this even related to findAll? Is this a random bug? Because...) The context of my <code>findAll</code> is pretty simple. Here's a sample call: </p>
  
  <pre><code>let words = 'hello world';
  Trigger.findAll({
      raw: true,
      where: {
        // Find any available trigger word in the message
        word: { $in: msg.split(' ') }
      }
  }).then(...)
  </code></pre>
  
  <p>...And that's all I've got. The bunch of other similar questions seem to be caused by some incorrect model definition, but I've checked mine and it <em>seems</em> to be correct. Only the <code>Trigger</code> model (out of a bunch of other, more complex models) is affected by this.</p>
  
  <p>The stack trace brings me to the definition of <code>findAll</code>: it turns out that <code>this.modelManager.sequelize</code> is undefined for some reason, but I'm not sure why or what I should be looking out for to correct this. I'd appreciate some guidance!</p>