Is it possible to write a generic enum converter for JPA?
Based on @scottb solution I made this, tested against hibernate 4.3: (no hibernate classes, should run on JPA just fine) Interface enum must implement: public interface PersistableEnum<T> { public T getValue(); } Base abstract converter: @Converter public abstract class AbstractEnumConverter<T extends Enum<T> & PersistableEnum<E>, E> implements AttributeConverter<T, E> { private final Class<T> clazz; public AbstractEnumConverter(Class<T> … Read more