bogdan_uman
@bogdan_uman
шлЫмазл неукЪ-поцЪ

Sequelize имя поля name?

Господа, а не подскажите в чем может быть проблема Sequelize не вставляет в запрос поле "name"?

models.GalleryCategory.create({ num: 1, visible: true, name: 'Test' });


Executing (default): INSERT INTO "GalleryCategories" ("id","num","visible","createdAt","updatedAt") VALUES (DEFAULT,$1,$2,$3,$4) RETURNING *; { plain: false,
  raw: false,
  logging: [Function: bound consoleCall],
  hooks: true,
  validate: true,
  fields: [ 'id', 'num', 'visible', 'createdAt', 'updatedAt' ],
  defaultFields: [ 'id', 'num', 'visible', 'createdAt', 'updatedAt' ],
  returning: true,
  hasTrigger: undefined,
  dialect: 'postgres',
  dialectModule: null,
  dialectModulePath: null,
  host: 'localhost',
  protocol: 'tcp',
  define: {},
  query: {},
  sync: {},
  timezone: '+00:00',
  clientMinMessages: 'warning',
  standardConformingStrings: true,
  omitNull: false,
  native: false,
  replication: false,
  ssl: undefined,
  pool: {},
  quoteIdentifiers: true,
  retry: { max: 5, match: [ 'SQLITE_BUSY: database is locked' ] },
  transactionType: 'DEFERRED',
  isolationLevel: null,
  databaseVersion: 0,
  typeValidation: false,
  benchmark: false,
  username: 'postgres',
  password: '***',
  database: '***',
  port: '5432',
  type: 'INSERT',
  instance:
   GalleryCategory {
     dataValues:
      { id: null,
        num: 1,
        visible: true,
        updatedAt: 2019-05-13T11:39:47.806Z,
        createdAt: 2019-05-13T11:39:47.806Z },
     _previousDataValues: { num: undefined, visible: undefined },
     _changed: { num: true, visible: true },
     _modelOptions:
      { timestamps: true,
        validate: {},
        freezeTableName: false,
        underscored: false,
        paranoid: false,
        rejectOnEmpty: false,
        whereCollection: null,
        schema: null,
        schemaDelimiter: '',
        defaultScope: {},
        scopes: {},
        indexes: [],
        name: [Object],
        omitNull: false,
        sequelize: [Sequelize],
        hooks: {} },
     _options:
      { isNewRecord: true,
        _schema: null,
        _schemaDelimiter: '',
        attributes: undefined,
        include: undefined,
        raw: undefined,
        silent: undefined },
     isNewRecord: true },
  model: GalleryCategory,
  bind:
   [ 1,
     true,
     '2019-05-13 11:39:47.806 +00:00',
     '2019-05-13 11:39:47.806 +00:00' ] }


Спасибо.
  • Вопрос задан
  • 87 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы