title: Typeorm find with and & or where block
body: <p>I am trying to build below query in typeorm.</p>
  
  <pre><code>SELECT * from Department where
  type = 'Employee' and
  ((from_date BETWEEN '2013-01-03'AND '2013-01-09') OR 
  (to_date BETWEEN '2013-01-03' AND '2013-01-09') OR 
  (from_date &lt;= '2013-01-03' AND to_date &gt;= '2013-01-09'))
  </code></pre>
  
  <p>Below is my typeorm equivalent.</p>
  
  <pre><code>connection.find(Department, {
        where: [
          { fromDate: Between(filter.fromDate, filter.toDate) },
          { toDate: Between(filter.fromDate, filter.toDate) },
          {
            fromDate: LessThanOrEqual(filter.fromDate),
            toDate: MoreThanOrEqual(filter.toDate),
          },
        ],
        andWhere: { type: 'Employee' },
      });
  </code></pre>
  
  <p>But somehow I am getting wrong number of output. It is as if andWhere is not working.
  Thanks in advance</p>