JPA Custom ID Generator
In this article we see how to write a Custom ID generator with Hibernate and JPA. We need this interface to handle the ID in the custom generator. import java.io.Serializable; public interface BaseId<T extends Serializable> { T getId(); void setId(T id); } This is the entity class. package org.madbit; import javax.persistence.*; @Entity @Table(name = “MY_TABLE”) public […]
Read More →