@Enumerated와 hibernate 타입 검증 관련 해결을 어떻게 해야할지 모르겠습니다.
I think you can use STRING type for Enumerated annotation, and then use @Enumerated(EnumType.STRING) annotation to map the enum values to their names. This way, you can avoid the problems caused by ORDINAL type, such as changing the enum order or adding new enum values. However, you still need to validate the input values, because the user can enter anything that is a string. You can use @NotNull annotation to prevent null values, and then use @Size annotation to limit the input values to a certain length. For example, @Size(min = 4, max = 5). This way, you can reject the input values that are too short or too long. You can also use @Pattern annotation to check if the input values match a regular expression. For example, @Pattern(regexp = "ADMIN|USER"). This way, you can reject the input values that are not ADMIN or USER. retro bowl