How to generate UUIDs as primary keys with Hibernate
| |

How to generate UUIDs as primary keys with Hibernate

Most developers prefer numerical primary keys because they are efficient to use and easy to generate. But that doesn’t mean that a primary key has to be a number. UUIDs, for example, have gained some popularity over recent years. The main advantage of a UUID is its (practical) global uniqueness which provides a huge advantage…

Spring Data JDBC – Modelling and working with aggregates

Spring Data JDBC – Modelling and working with aggregates

Entities, aggregates, and aggregate roots are some of the core concepts used by Spring Data JDBC. Based on them, Spring Data JDBC decides which objects it loads or persists together. They also define which kind of associations you can model. That shows how important it is to understand both concepts and how they work together….

Hibernate’s StatelessSession – What it is and how to use it

Hibernate’s StatelessSession – What it is and how to use it

Some of Hibernate’s core features are automatic dirty checks, flushes, and the 1st level cache. They make the implementation of most standard use cases simple and efficient. But they also add a lot of hidden complexity and are not a great fit for all use cases. Your typical nightly import job or most other use…