title: Return statement in function
body: <p>In the below example which i got from Sequelize docs on transactions, I don't understand why you have to add return statements for the queries and also on the sequelize transaction method.</p>
  
  <pre><code> function doTransaction () {
          return sequelize.transaction(function (t) {
  
            // chain all your queries here. make sure you return them.
            return User.create({
              firstName: 'Abraham',
              lastName: 'Lincoln'
            }, {transaction: t}).then(function (user) {
              return user.setShooter({
                firstName: 'John',
                lastName: 'Boothe'
              }, {transaction: t});
            });
  
          }).then(function (result) {
            // Transaction has been committed
            // result is whatever the result of the promise chain returned to the transaction callback
          }).catch(function (err) {
            // Transaction has been rolled back
            // err is whatever rejected the promise chain returned to the transaction callback
          });
      }
  </code></pre>