Please best practice and ‘how to’ for using enum with jpa as a data member of persisted entity.
what is the best practice?
I want to persist “C”, “O” from enum. (codes). If this is not the correct approach please suggest.
Enum defination is —
public enum Status{
CLOSED ("C")
OPEN ("O")
private final int value;
private Status(final int pValue){
this.value = pValue;
}
public int value(){
return this.value;
}
expected Solution:
enum defination:
}
Entity Definition: