I have an enumeration in the class displayed by Hibernate. One of the displayed fields is the enumeration type, which has one of the following OK , NOK, or NAP values . NOK or NAP works as expected, but when the field in which the class is set is set to OK, Hibernate does not display or retrieve the value that is set to null:
java.lang.IllegalArgumentException: Unknown name value for enum class com.a.b.c.d.Class$Status: OK
at org.hibernate.type.EnumType.nullSafeGet(EnumType.java:113)
The class has:
private Status status;
@JoinColumn(name = "STATUS")
@Enumerated(EnumType.STRING)
public Status getStatus() {
return status;
}
public enum Status {
OK, NOK, NAP;
}
OK OK2, . _OK .
, "" (, ) .
!
UPDATE:
Up ' , , _OK' ' ', . , .
public enum Status {
_OK("OK"),
NOK("NOK"),
NAP("NAP");
private String desc;
private Status(String desc){
this.desc = desc;
}
public String getDesc(){
return desc;
}
}
BUG:
A .