Subscribe on YouTube to not miss any video.
During last week’s stream, I was asked to show how to implement soft deletes with Hibernate. So, that will be the topic of this week’s stream.
In addition to the stream, you might find this article useful:
How to implement a soft delete with Hibernate.
Question of the Week
The handling of bidirectional associations defined by the JPA specification seems to be easy and comfortable. But it introduces a few pitfalls that can cause severe problems. A typical example for that is this week’s Question of the Week:
If you want to dive deeper into association management, you can find my best articles about that on this overview page.
And you also might enjoy one of the previous Coffee with Thorben streams: Coffee with Thorben – Association Pitfalls.
This week’s tutorials
Over the last few weeks, I got several questions about association mappings, the best fetching behavior, and general best practices. Answering them was usually easy because I had already written several articles about these topics.
But it also showed that I was missing a page that pulls all these articles together. So, for this week’s content, I decided to work on that page instead of writing a new article. You can now find my best tutorials about managing associations with JPA and Hibernate here.
Spring Data JPA supports various ways to retrieve data from your database. Native queries are the most flexible option. They enable you to use all the features supported by your database and are your best option for very complex use cases.
But all this flexibility comes with a few downsides. Some of Spring Data JPA’s are not available for native queries, and others require a little bit of extra work. I dive into the details of all of this in this week’s video: