title: Implementing Q with Strongloop Loopback
body: <p>Q is a <a href="http://docs.strongloop.com/display/NODE/Supporting+module+reference" rel="nofollow">"supporting module" of loopback</a>.  I'm not totally sure what that means, but I'm assuming that it at least means that is possible to use Q with loopback's Persistent Model functions, like <code>find()</code> or <code>findOne()</code>. I'd like to know how to properly setup something like the following:</p>
  
  <pre><code>app.models.Question.findOne({
      where: {name: "My Question"}
  }, function (err, result) {
      throw err if err
  }).then(function () {
      console.log("success")
  })
  </code></pre>
  
  <p>I have installed Q in my project's directory using NPM, but so far as I can tell, <code>app.models.Question.findOne()</code> is still returning undefined, rather than a usable Q promise.</p>
  
  <p>According to the <a href="http://docs.strongloop.com/display/NODE/Supporting+module+reference" rel="nofollow">loopback docs</a>, using Q,</p>
  
  <blockquote>
    <p>If a function cannot return a value or throw an exception without
    blocking, it can return a promise instead.</p>
  </blockquote>
  
  <p>What do I need to do to get loopback to return a promise in this situation?</p>