title: How do I use both a '<>' and a 'whereNotIn' when querying with knex and Bookshelf?
body: <p>I have a model, 'Excerpt', and want to fetch all excerpts that are NOT owned by a given user, and are NOT in a list of excluded excerpts <em>(e.g. no excerpts with id's from the list [0, 1, 2, 3])</em>.</p>
  
  <p>I've successfully selected all excerpts not owned by a user, by using:</p>
  
  <pre><code>Excerpt
      .query({
          whereNot: { owner_id : req.currentUser.id }
      })
      .fetchAll()
      .then((excerptResults) =&gt; {
        res.status(200).json(excerptResults);
      });
  </code></pre>
  
  <p>and I have tried to use <code>whereNotIn</code> to exclude excerpts with the following snippet <em>(as per <a href="https://stackoverflow.com/questions/36131004/perform-a-where-in-query-in-bookshelf-js">this stackoverflow post</a>)</em>:</p>
  
  <pre><code>Excerpt
      .query({
        whereNotIn: { id : [0, 1, 2, 3] }
      })
      .fetchAll()
      .then((excerptResults) =&gt; {
        var tasks = [];
        for(var i=0; i&lt;excerptResults.models.length; i++) {
          tasks.push(excerptResults.models[i].attributes);
        }
        res.status(200).json(tasks);
      });
  </code></pre>
  
  <p>Unfortunately, I get the following error message</p>
  
  <p><code>Unhandled rejection Error: Undefined binding(s) detected when compiling SELECT query: select "excerpts".* from "excerpts" where "[object Object]" not in (?)</code></p>
  
  <p>I don't really understand the error message. Does anybody have any ideas?</p>