Sequelize, convert entity to plain object

后端 未结 9 1185
说谎
说谎 2020-12-12 16:53

I\'m not very familiar with javascript, and stunning, because i can\'t add new property, to object, that fetched from database using ORM names Sequelize.js.

To avoid

9条回答
  •  失恋的感觉
    2020-12-12 17:27

    For those coming across this question more recently, .values is deprecated as of Sequelize 3.0.0. Use .get() instead to get the plain javascript object. So the above code would change to:

    var nodedata = node.get({ plain: true });
    

    Sequelize docs here

提交回复
热议问题