开发模式:
Movie.init(classicFields, {
sequelize,
tableName: 'movi' // 这里打错
})
控制台输出:
Executing (default): SELECT `id`, `image`, `content`, `pubdate`, `fav_nums`, `title`, `type`, `created_at`, `updated_at`, `deleted_at` FROM `movi` AS `Movie` WHERE (`Movie`.`deleted_at` IS NULL AND `Movie`.`id` = 1);
FROM movi
AS Movie
Sequelize 自动创建了一个表 “movi”, 导致前端取不到数据,后端不抛异常!