We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Enumerated
enum OrderStatus{ READY, FINISH }
@Enumerated(EnumType.ORDINAL) private OrderStatus orderstatus;
@Enumerated(EnumType.STRING) private OrderStatus orderstatus;
EnumType.STRING인 경우 DB에 READY, FINISH로 저장
만약 OrderStatus에 필드가 추가 된다면?
enum OrderStatus{ READY, DELIVERY, FINISH }
The text was updated successfully, but these errors were encountered:
EnumType.STRING인 경우 DB에 READY, FINISH로 저장 만약 OrderStatus에 필드가 추가 된다면? enum OrderStatus{ READY, DELIVERY, FINISH } EnumType.ORDINAL인 경우에 기존 DB의 OrderStatus 속성값의 2는 DELEVERY가 되어 큰 문제가 발생 @Enumerated의 기본 값은 EnumType.ORDINAL이므로 반드시 EnumType.STRING으로 사용하자!
@Enumerated(EnumType.STRING)
Sorry, something went wrong.
No branches or pull requests
@Enumerated
을 이용할 때 반드시 EnumType은 String을 사용하자!@Enumerated
애너테이션에는 두 가지 EnumType이 존재EnumType.STRING인 경우 DB에 READY, FINISH로 저장
만약 OrderStatus에 필드가 추가 된다면?
The text was updated successfully, but these errors were encountered: