Install H2 database

H2 database is an open source Java database. We often use the H2 database for testing purposes with its in-memory database feature. In addition, H2 database can also be installed to use as a normal database. In this tutorial, I will guide you how to… Read More

Learn about @GeneratedValue annotation in JPA – Part 2

This tutorial is continued part 1. The next strategy we want to talk is the GenerationType.SEQUENCE strategy You declare this strategy in the Clazz entity as follows:

Similar to GenerationType.TABLE strategy, GenerationType.SEQUENCE strategy also depends on the value of “hibernate.id.new.generator_mappings” property in the JPA… Read More