title: sequelize: Not include model if where conditon of included model matches
body: <p>I want to get all RecurringEvents that have no excludeDates for today.</p>
  
  <p>I have following models:</p>
  
  <p>Recurring events</p>
  
  <pre><code>const RecurringEvent = sequelize.definge('recurringEvent,{
         id: {type: Sequelize.INTEGER, primaryKey:true},
         title: Sequelize.STRING
         });
  </code></pre>
  
  <p>And ExcludeDates with a foreign key recurringEventId</p>
  
  <pre><code>const ExcludeDate = sequelize.define('exclude_date',{
    id: {type: Sequelize.INTEGER, primaryKey:true},
    recurringEventId: Sequelize.INTEGER,
    date: Sequelize.DATE
  });
  </code></pre>
  
  <p>As a relationship i defined </p>
  
  <pre><code>RecurringEvent.hasMany(ExcludeDate, {foreignKey: 'recurringEventId'});
  </code></pre>
  
  <p>I can get all my RecurringEvents including the the excludeDates with</p>
  
  <pre><code>RecurringEvent.findAll({include:[{model:ExcludeDate}]});
  </code></pre>
  
  <p>That will give me an output like:</p>
  
  <pre><code>[
   {
   "id": 1,
   "title": "Event1",
   "exclude_dates": [
    {
      "id": 1,
      "date": "2019-02-13",
      "recurringEventId": 1,
    },
   {
      "id": 2,
      "date": "2019-02-14",
      "recurringEventId": 1,
    }
  ]
  </code></pre>
  
  <p>Now i would like to get the Recurring events but only if there is no exclude date for today.</p>
  
  <p>so far i have tried </p>
  
  <pre><code>RecurringEvent.findAll({
      include: [{
          model: ExcludeDate,
          where: {
              date: {
                  [Op.ne]: moment().format('YYYY-MM-DD')
              }
          }
      }]
  })
  </code></pre>
  
  <p>But that only leaves out the ExcludeDate entry with the current Date like that :</p>
  
  <pre><code>[
   {
   "id": 1,
   "title": "Event1",
   "exclude_dates": [
   {
  "id": 2,
  "date": "2019-02-14",
  "recurringEventId": 1,
   }
  ]
  </code></pre>
  
  <p>How can i exclude the whole RecurringEvent if and ExcludeDate for it is set for today?</p>
  
  <p><strong>Edit:</strong> </p>
  
  <p>I also read in the docs </p>
  
  <blockquote>
    <p>To move the where conditions from an included model from the ON condition to the top level WHERE you can use the '$nested.column$'</p>
  </blockquote>
  
  <p>So i have tried this:</p>
  
  <pre><code>RecurringEvent.findAll({where:{
  '$exclude_dates.date$':{
  [Op.ne]: moment().format('YYYY-MM-DD')
  }
  },
  include: [{model: ExcludeDate}]
  })
  </code></pre>
  
  <p>But without any luck, i'm still getting RecurringEvents just without the one exclude date in the exclude_dates property</p>