I am using typeorm with Mongo database. I want to provide a default value for a column with boolean
datatype.
My entity looks as following:
@ObjectIdColumn()
id: ObjectID;
@Column()
name: string;
@Column()
startDate: Date;
@Column()
endDate: Date;
@Column()
inspectionTypeId: string;
@Column()
questions: string[];
@Column('boolean', {default: true})
isActive: boolean;
However, when I save into the repo, isActive
column is not added.