All Serializable types which are not Java Basic types (String, primitives etc) can be persisted into VARBINARY SQL type, check out this tutorial for details.

Note

Converters can be used to convert basic attributes defined by entity classes, mapped superclasses, or embeddable classes. They cannot be used on the @Id, @Version, relationships (@OneToOne, @OneToMany, @ManyToOne ), @Temporal and @Enumerated attributes.

Example Project

Dependencies and Technologies Used:

h2 1.4.196: H2 Database Engine.

hibernate-core 5.2.12.Final: The core O/RM functionality as provided by Hibernate.Implements javax.persistence:javax.persistence-api version 2.1