Subscribe on YouTube to not miss any video. JSON Mappings The mapping of associations seems easy but there are several pitfalls you should avoid. Links mentioned in the video: How to use PostgreSQL’s JSONB data type with Hibernate PostgreSQL documentation: JSON Types PostgreSQL documentation: JSON Functions and Operators If you want to learn more about

Read More

If you want to implement a reactive application, you not only need to adapt your way of thinking and switch to reactive libraries for your business layer. You also need to access your database in a reactive way. One way to do that is to use Hibernate Reactive. It’s based on Vert.X and implements the

Read More

Subscribe on YouTube to not miss any video. Association Mapping Pitfalls The mapping of associations seems easy but there are several pitfalls you should avoid. Articles mentioned in the video: Ultimate Guide – Association Mappings with JPA and Hibernate Entity Mappings: Introduction to JPA FetchTypes Why you should avoid CascadeType.REMOVE for to-many associations and what

Read More

Like most Java developers, you probably use Hibernate directly or via Spring Data JPA to implement your application’s persistence layer. In general, this works very well for most use cases, but it causes some issues if you need to implement a batch job. This is because Hibernate, like most object-relational mapping frameworks, maps each database

Read More

Subscribe on YouTube to not miss any video. Database Migration You have various options to automate the creation and update of your database. You can use JPA’s schema generation feature or use version-based database migration tools, like Flyway and Liquibase. I explained all of them in great detail here on the blog. You can find

Read More

Wow, 2020 has been a wild one. I’m sure all of us could talk for hours about the problems and all the stuff we were unable to do. So, let’s skip that and focus on the good parts. There were quite a few things that went unexpectedly well. I will summarize the most interesting ones

Read More

Disclaimer: This post is sponsored by Cockroach Labs. CockroachDB is an open-source relational database designed to be highly scalable and reliable in distributed environments. It’s available on AWS and Google Cloud or as an on-premise installation. This makes it an interesting candidate for microservice-based applications. If you want to give it a try or if

Read More

When we’re talking about performance optimizations for Spring Data JPA, the handling of associations is always an important topic. Because Spring Data JPA is based on JPA and most often used with Hibernate, you can apply all the performance tuning concepts you can find here on the blog. The most important one is to use

Read More