TypeORM/@BeforeInsert() @BeforeUpdate 차이 (1) 썸네일형 리스트형 @BeforeInsert와 @BeforeUpdate()의 차이 TypeORM을 사용하면서 시간이 지나고 이해가 된 부분을 한 번 설명해 보겠다! @BeforeInsert : " 이 데코레이터는 hashingPw 함수가 this.password를 DB에 삽입 하기 전에 실행한다" @BeforeUpdate: "이 데코레이터는 hashingPw 함수가 this.password를 DB에 password 컬럼 값을 업데이트 즉 변경할 경우 실행을 한다. 똬! " import { CoreEntity } from 'src/common/entites/core.entity'; import { BeforeInsert, BeforeUpdate, Column, Entity } from 'typeorm'; import * as bcrypt from "bcrypt"; import { Int.. 이전 1 다음