'columnMetadata.enum.map is not a function
When compiling my migration for my NestJs app it's breaking and I'm getting the following error with no effective way to trace it:
columnMetadata.enum.map is not a function
My linter shows no errors in any of my entities.
Solution 1:[1]
Found the issue:
@ApiProperty()
@Column({
type: 'enum',
enum: Type.Other,
})
type: Type;
I had defined the default as the enum in my entity class. Here's the corrected code:
@ApiProperty()
@Column({
type: 'enum',
enum: Type,
default: Type.Other,
})
type: Type;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jay |
