How to Generate Values of Basic Entity Attributes with Hibernate
Hibernate and the JPA specification define multiple generators to create unique primary key values. An obvious question when learning about these generators is if you can apply them to basic attributes as well. Unfortunately, the answer is no. But Hibernate’s ValueGenerator provides an easy-to-use alternative. As I will show you in this article, you can…