Sequelize Upsert does not return to Row

Asked

Viewed 44 times

0

Why the Sequelize is not returning me to Row in the method Upsert? According to the documentation should return Promise<Model, Boolean|null> the option of returning already is true by default.

I am used Mysql, my code:

async comment() {
    return models.Comment.upsert({
      id: this.data.id,
      fkalbun: this.data.fkalbun,
      fkuser: this.socket.user.iduser,
      comment: this.data.comment,
    }, {
      returning: true,
    });
  }
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.