Quantcast
Channel: Vlad Mihalcea
Viewing all articles
Browse latest Browse all 177

Hibernate default entity sequence

$
0
0
Introduction In this article, we are going to see how the default entity sequence changes when migrating from Hibernate 5 to Hibernate 6. Domain Model Let’s assume we have a Post parent entity that has a one-to-many bidirectional association with the PostComment child entity. The Post parent entity looks like this: And the PostComment looks as follows: Notice that both entities use the GenerationType.SEQUENCE automatic identifier generation strategy. Hibernate 5 default entity sequence On Hibernate 5, if you use the hbm2ddl tool to generate the database schema from the JPA entity mappings,... Read More

Viewing all articles
Browse latest Browse all 177

Trending Articles