> For the complete documentation index, see [llms.txt](https://heunnajo.gitbook.io/jpa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heunnajo.gitbook.io/jpa/2./address.md).

# (복습, 정리) 값 타입(Address 클래스) 주의 사항

값 타입은 특히 변경불가능하게 설계해야한다! Setter를 제거하고, 생성자에서 값을 모두 초기화한다. JPA 스펙상 엔티티나 임베디드(@Embeddable) 타입은 자바 기본 생성자(default constructor)를 private 또는 protected로 설정함으로써 변경 불가능하도록 해야한다.

값타입이 여기저기서 사용되고 공유될 수 있기 때문에 값타입을 변경 불가능하게 해야한다.
