public class Document {
@Id
@Column(name = "id")
@GeneratedValue
private Long id;
@Column(name = "type")
private Long subjectType;
@Column(name = "markup")
@Enumerated(EnumType.STRING)
private RuleMarkup nonRuleMarkup = RuleMarkup.MANUAL;
}
public enum RuleMarkup {
MANUAL("manual markup"),
NO_REQUIRED("markup not required");
private final String rule;
}
how to save in DB the default value by enum not the name MANUAL but value 'manual markup'?
getRule() doesn't work because it returns String type
I implemented interface
AttributeConverter:and just marked my fieald as
@Column.