LoginSignup
0
0

More than 5 years have passed since last update.

【Sequelize】this.build(...).save is not a function

Last updated at Posted at 2018-08-24

this.build(...).save is not a function

考えられること

createするときのデータが配列(array)になっていないか?

const datas = [{ ... }];

idを作成するときにcreateを使用するとこのエラーが発生する。bulkCreateを使用しよう。

createを使う場合はdatasをオブジェクトに変えよう。

const datas = { ... };

引用

mysql - Sequelize TypeError build.save is not a function - Stack Overflow
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0