We use jOOQ 3.15.4 with Spring Boot 2.6.2
We have an enum stored as a string in database. It looks like this in the generated code:
public final TableField<StatusRecord, String> STATUS = createField(DSL.name("status"), SQLDataType.VARCHAR(255).nullable(false), this, "");
When reading it, we fetch into an object with @Column annotations:
@Column(name = "status")
StatusEnum status
The behavior we see is that when we have a string in DB that does not correspond to any value of the enum, the status field in the object that we map into is null.
Is there a way to have this type safe, and have a MappingException thrown when the string cannot be mapped to the enum, like the standard behavior of the valueOf method of an enum ?