Skip to content

2.0.0-alpha3 ENUM not observing notNull property. #839

@tthew

Description

@tthew

ENUM's are not observing the notNull property.

see line 155 dao.js

if (isEnum && hasValue && valueOutOfScope) {
          throw new Error('Value "' + values[attrName] + '" for ENUM ' + attrName + ' is out of allowed scope. Allowed values: ' + definition.values.join(', '))
}

example:

    gender: {
      type: Sequelize.ENUM,
      values: ['male', 'female', 'other'],
      allowNull: true,
    }
Value "null" for ENUM gender is out of allowed scope. Allowed values: male, female, other

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions