public enum Sources {
SOURCE_MANUAL("manual"),
SOURCE_RE_EDITING("re editing");
private String source;
private Sources(String source){
this.source = source;
}
public String getSource() {
return source;
}
}
Mapping in Domain object as
@Column(name = "SOURCE")
@Enumerated(EnumType.STRING)
public Sources getSource() {
return this.source;
}
Issue : the source column in the DB have values (manual, re editing) so when ever i try to load the object i am getting the following exception
Caused by: java.lang.IllegalArgumentException: No enum const class api.domain.Sources.manual
[java] at java.lang.Enum.valueOf(Enum.java:214)
[java] at org.hibernate.type.EnumType.nullSafeGet(EnumType.java:124)
am i doing something wrong here ?