I have this decorator code with typeorm:
@t.Entity('vibe_trace')
export class Trace extends From<Trace> {
@t.ObjectIdColumn({nullable: false, default: () => new MongoId().toHexString()})
@val.IsNotEmpty()
@val.IsString()
id!: string;
}
but I get this error:
[
ValidationError {
children: [],
constraints: {
isNotEmpty: 'id should not be empty',
isString: 'id must be a string'
},
is there a good reason for this? default function must not be called