title: TypeORM evokes error in findOne query - QueryFailedError: ER_NO_DEFAULT_FOR_FIELD: Field 'type' doesn't have a default value
body: <p>I am using MySQL database backed by TypeORM and Nodejs. I have an entity that records holidays. now the insertion works pretty well, but the problem is <code>findOne</code> query does not work.</p>
  <p>Here is the entity:</p>
  <pre><code>import {
    Column,
    CreateDateColumn,
    Entity,
    PrimaryGeneratedColumn,
    UpdateDateColumn,
    VersionColumn,
  } from &quot;typeorm&quot;;
  
  @Entity()
  export class Holiday {
    @PrimaryGeneratedColumn(&quot;uuid&quot;)
    id: string;
  
    @Column()
    type: string;
  
    @Column({ nullable: true, default: null })
    weekDay?: string;
  
    @Column({ nullable: true, default: null })
    date?: Date;
  
    @Column({ default: null })
    remark?: string;
  
    @CreateDateColumn()
    createdAt: Date;
  
    @UpdateDateColumn()
    updatedAt: Date;
  
    @VersionColumn()
    version: number;
  }
  </code></pre>
  <p>This is the query I'm executing to <code>findOne</code> record:</p>
  <pre><code>const holiday = await getConnection()
          .manager.getRepository(Holiday)
          .findOne(id); //id of the record that needs to find.
  </code></pre>
  <p>The Error I encounter:</p>
  <pre><code>QueryFailedError: ER_NO_DEFAULT_FOR_FIELD: Field 'type' doesn't have a default value
  code: 'ER_NO_DEFAULT_FOR_FIELD',
  errno: 1364,
  sqlMessage: &quot;Field 'type' doesn't have a default value&quot;,
  sqlState: 'HY000',
  index: 0,
  sql: &quot;INSERT INTO `holiday`(`id`, `type`, `weekDay`, `date`, `remark`, `createdAt`, `updatedAt`, `version`) VALUES ('b8b93d11-2346-4388-bf87-738b61c41118', DEFAULT, DEFAULT, '2021-08-10 06:53:58.213', DEFAULT, DEFAULT, DEFAULT, 1)&quot;
  </code></pre>