title: Association without foreign keys and make join in table
body: <p>I am working on Node + sequelize  + mysql. All the things is working fine in my code. Now i need to add search field in list page. In this search page there is showing user first name, last name, company name and status. I got all data from one table but company comes from "Company" table. In user table there is company_id. I can not make association for company_id. Now i want to search from company_name too. How i add include without association.  </p>
  
  <pre><code>const { User, Company } = require("../models"); 
  
  if(query.trim() != "") { 
          [err, users] = await to(User.findAll({
              where : {[Op.or] : {first_name:{ [Op.like]: '%'+query.trim()+'%' },last_name:{ [Op.like]: '%'+query.trim()+'%' }}}, 
              include : [
                  {
                      model:Company,
                      where : {company_name:{ [Op.like]: '%'+query.trim()+'%' }}
                  }],
              limit: 5,
              offset: 0,
              order: [[id, ASC]]
          }));
          console.log('err ----------------',err);
          console.log(users);
  }
  </code></pre>
  
  <p>I got below error on from above code : </p>
  
  <pre><code>err ---------------- { filename:
     '/var/www/html/fullproject-name/backend/node_modules/sequelize/lib/model.js',
    line: 583,
    row: 13,
    message: 'Company is not associated to User!',
    type: 'SequelizeEagerLoadingError',
    stack:
     'SequelizeEagerLoadingError: Company is not associated to User!\n    at Function._getIncludedAssociation..... }
  </code></pre>
  
  <p>User Model Code  : </p>
  
  <pre><code>module.exports = (sequelize, DataTypes) =&gt; {
      var Model = sequelize.define('User', { 
          email: {type: DataTypes.STRING, allowNull: true, unique: true, validate: { isEmail: {msg: "Phone number invalid."} }}, 
          company_id: DataTypes.INTEGER,
          first_name: DataTypes.STRING,
          last_name: DataTypes.STRING, 
          active:DataTypes.INTEGER, 
      });
  
  }
  </code></pre>
  
  <p>Company Model Code : </p>
  
  <pre><code>module.exports = (sequelize, DataTypes) =&gt; {
    var Model = sequelize.define('Company', {
      company_name: DataTypes.STRING, 
      company_attachment: DataTypes.STRING,
    });
     }
  </code></pre>