title: Nodejs mixed async functions and promises
body: <p>So I have sails app with some help service to make it easier to create and get complex models.
  one of theses are</p>
  
  <pre><code>getMerits: function(profileId, limit){
  return async.waterfall([
    function(callback){
      Merit.find({employeeProfile: profileId}).then(function(merits){
        callback(null, merits);
      });
    },
    function(merits, callback){
      async.forEach(merits, function(item, loop_callback){
        MeritIndex.findOne({id: item.index}).then(function(meritIndex){
          merits[merits.indexOf(item)].index = meritIndex;
          loop_callback();
        });
      }, function(err, results){
        callback(null, merits);
    });
    }
  ], function(err, results){
    return results;
  });
  </code></pre>
  
  <p>}</p>
  
  <p>the trouble is when I try to call this function to get the result(list of merits with their meritindexes inserted.) I cant figure out the correct way to get the results returned from the async waterfall:</p>
  
  <pre><code>async.forEach(profiles, function(item, loop_callback){
        MeritService.getMerits(item.id, 5).exec(function(err, merits){
          console.log(merits)
          profiles[profiles.indexOf(item)].merits = merits;
          loop_callback();
        });
        // MeritService.getMerits(item.id, 5).exec(function(m){
        //   console.log(m)
        //   profiles[profiles.indexOf(item)].merits = m;
        //   loop_callback();
        // });
      }, function(err){
          console.log("PROFILES" + JSON.stringify(profiles))
      });
  </code></pre>
  
  <p>the print  of merits here results in undefined. Is there any way to treat async waterfall as a promise and use then instead of exec?</p>