You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
❌ 문제 상황
No response
📝 핵심 내용과 방향성
Enum
Enumeration의 앞 글자로 열거라는 의미를 갖는.
Enum(열거형)은 상수들의 집합을 나타내는 데이터 타입이다. 주로 상태 값, 카테고리, 역할(Role) 등을 정의할 때 사용한다.JPA에서
@Enumerated사용법Spring Boot + JPA에서
Enum을 사용할 경우,@Enumerated어노테이션을 통해 DB 저장 방식을 결정할 수 있다.(1)
@Enumerated(EnumType.STRING)DB 저장 예시: "PENDING", "SHIPPED"
(2)
@Enumerated(EnumType.ORDINAL)Enum을 JPA에서 안전하게 사용하기
RoleType/Role의 차이점
🎯 차이점 정리
📚 트러블슈팅 및 기대효과
No response
🔗 관련 자료
No response
🙋 담당자
Beta Was this translation helpful? Give feedback.
All reactions