I'm trying to wait for all of my database calls in a loop to complete before I proceed. I add each call, which are promises, to an array and then use `Promise.all()` to wait for all of them. However, there are nested DB calls like `user.increment()` or `user.create()` which `Promise.all()` does not seem to wait for. The output of this snippet usually goes:

```
User found, incrementing wins...
Promise.all()
User updated

```

The `Promise.all` block is being run before the nested DB calls complete. I feel like I'm missing something really easy.

```
let dbCalls = [];
for(var i = 0; i < users.length; i++){
    let messageUser = users[i];
    //try to find user by id
    dbCalls.push(db.user.findOne({
            where: {
                id: messageUser.id
            }
        }).then(function(user){
            if(user){
                //found user, increment them
                user.increment('wins').then((user) => {
                    console.log('User found, incrementing wins...');
                    user.reload();
                }).then(user => {
                    console.log('User updated')
                    return user;
                });
            } else{
                //user wasn't found, create them
                console.log(`${messageUser.username} was not found, creating user...`);
                db.user.create({
                    username: messageUser.username,
                    id: messageUser.id,
                    wins: 1
                }).then(function(user){
                    console.log('created user');
                    return user;
                });
            }
        }).then(res => {
            return res;
        })
    );
}

Promise.all(dbCalls).then(res =>{
    console.log('Promise.all()' + res);
});

```