LoginSignup
0
0

More than 3 years have passed since last update.

TypeORMでなぜかTransformerが2回走る

Posted at

EntityのColumnのdefault valueを消すと直ることがあるようです。理由は調べてません。

Does not happen when remove default value of column option.
https://github.com/typeorm/typeorm/issues/5719

Before

  @Column({
    type: 'varchar',
    length: 1024,
    default: '{"days_max": 720}',
    name: 'options',
    transformer: CompanyOptionsTransformer
  })
  options: Options;

After

  @Column({
    type: 'varchar',
    length: 1024,
    // default: '{"days_max": 720}', この行を消す
    name: 'options',
    transformer: CompanyOptionsTransformer
  })
  options: Options;
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0