B
B
Bogdan2019-05-13 16:37:57
Node.js
Bogdan, 2019-05-13 16:37:57

Sequelize return fields on Update?

Hello, tell me please. What is the correct way to return an updated record in Sequelize?

const category = await models.GalleryCategory.update(
    { num, visible, name }, { where: { id } }
  );

Object returned now
5cd973538e13f292032122.png
Thank you

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex_kulkoff, 2019-07-10
@alex_kulkoff

I did not find how, I use later:

.then(() => {
models.GalleryCategory.findOne(
    { where: { id } }
})

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question