Is there a way to tell JPA / EclipseLink to ignore enums it encounters in the database that aren't defined in the java enum?
Instead of getting this exception: No conversion value provided for the value...
There doesn't seem to be a way to add an enum to the DB, promote a new version of the code, while keeping another old instance of the code running on the same database.
1 Answer 1
EclipseLink uses an EnumTypeConverter to convert Enums, which is a subclass of ObjectTypeConverter.
If you use an @ObjectTypeConverter directly, you can set a defaultObjectValue to default values from the database that are not mapped. You could also use your own Converter, or set the defaultValue in the EnumTypeConverter through a DescriptorCustomizer.