Closed June222 closed 8 months ago
@Entity
class Steel {
...
@OneToMany(mappedBy = "steel", orphanRemoval = true, cascade = CascadeType.ALL)
private List<SteelLabel> labels = new ArrayList<SteelLabel>();
...
}
Steel Instance 생성 시에 builder()를 통해서 생성하는 경우 기본 선언에 빈 ArrayList<>()가 있음에도 적용받지 않음.
따라서 위 toEntity()코드에 주석 부분을 해제하여 해결할 수 있음.
서버를 시작하는데 Error가 뜸
Response Body
Log
SteelService.addData() Code
AddReqDto.toEntity() Code
addLabel() Code