Hibernate hbm2ddl.auto schema generation
Introduction In this article, we are going to see how the Hibernate hbm2ddl.auto schema generation tool works, and when it’s appropriate to use it.
Bulk Update and Delete with JPA and Hibernate
Introduction JPA and Hibernate allow us to execute bulk update and delete queries so that we can process multiple rows that match the business use case filtering criteria. When modifying multiple records, you have two options. You could either use batch processing or bulk processing. While batch processing is useful when entities are already managed by the current Persistence Context because it can reduce the number of INSERT, UPDATE, or DELETE statements that get executed, bulk processing allows us to modify the underlying database records with a single SQL statement.
JPA AttributeConverter – A Beginner’s Guide
Introduction In this article, we are going to see how the JPA AttributeConverter works and how we can use it to customize the entity attribute to the database column mapping. For instance, we could use a JPA AttributeConverter to map a Java MonthDay to a database DATE column because Hibernate doesn’t offer a built-in MonthDayType to handle this particular mapping.
How does orphanRemoval work with JPA and Hibernate
Introduction In this article, we are going to see how the JPA and Hibernate orphanRemoval mechanism allows us to trigger an entity child remove operation upon disassociating the child entity reference from the child collection on the parent side.
Java Map to JSON mapping with JPA and Hibernate
Introduction In this article, we are going to see how we can store Java Map entity attributes in JSON columns when using JPA, Hibernate, and the Hypersistence Utils project. While you can also persist Java Map entity attributes in PostgreSQL HStore columns, a JSON column type is a much more common option, especially since it works with other relational databases, like Oracle, SQL Server, or MySQL. As you already have seen, the Hypersistence Utils project allows you to map a JSON column type to a wide variety of JPA entity attributes, like… Read More

