boostcampwm2023/baekjoonrooms

Fix: QueryFailedError: Field 'username' doesn't have a default value

vimkim opened this issue · 2 comments

image

QueryError

Room에서 cascade: true, nullable: true 를 지워주니까 해결...?

lazy relation, promise 관련 버그입니다.
this.repository.create() 로는 생성이 안 되고,
this.repository.save(
{ code, host: Promise.resolve(user) });

이걸로만 생성이 됩니다.

typeorm/typeorm#2276
typeorm/typeorm#10530

2년전, 그리고 지난 주에도 계속 이슈가 되어온 버그?인 듯 합니다.