Skip to content

Column of type "enum" throws missing properties error #7541

@martingmoreno

Description

@martingmoreno

Hello there!

Issue Description

The version of TypeORM was updated to the latest release, while starting up the NestJS server it started throwing this enum error. As of my understanding the required properties are in the decorator.

Expected Behavior

To start correctly the TypeOrmCoreModule

Actual Behavior

Error: Column "type" of Entity "StandardSet" is defined as enum, but missing "enum" or "enumName" properties.

Steps to Reproduce

This code worked in version 0.2.31, once it was upgraded to 0.2.32 this error started appearing.

enum StandardSetType {
  AcademicStandard = 'AcademicStandard',
  FoundationalKnowledge = 'FoundationalKnowledge',
  AchievementDescriptor = 'AchievementDescriptor',
}

@Column('enum', { enum: StandardSetType, name: 'type' })
type: StandardSetType;

My Environment

Dependency Version
Operating System Ubuntu
Node.js version v14.15.5
Typescript version 3.9.9
TypeORM version 0.2.32
NestJS 7.6.13
nestJS/TypeORM 7.1.5

Additional Context

Relevant Database Driver(s)

  • aurora-data-api
  • aurora-data-api-pg
  • better-sqlite3
  • cockroachdb
  • cordova
  • expo
  • mongodb
  • mysql
  • nativescript
  • oracle
  • postgres
  • react-native
  • sap
  • sqlite
  • sqlite-abstract
  • sqljs
  • sqlserver

Are you willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time, and I know how to start.
  • Yes, I have the time, but I don't know how to start. I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions