Welcome to the Hibernate community newsletter in which we share blog posts, forum, and StackOverflow questions that are especially relevant to our users.
Don’t miss our Hibernate developer interview with Dmitry Alexandrov.
If you want to share your story about Hibernate, let us know, and we can share it with our huge community of passionate developers.
I was told about a new blog post which proclaims that Lazy loading is a code smell. Well, in my experience, this is exactly the opposite since I’m a strong believer that EAGER fetching is almost always a bad way of fetching data. After reading Sebastian Malaca’s article, I managed to find a very interesting series of article on mixing JPA and DDD (Domain-driven design).
DDD is a great approach. However, trying to treat a relational database as if it were a document store can be very detrimental to application performance. All in all, JPA entities are not the same as DDD entities. In fact, JPA entities are just the persistent state of the Domain Model.
Orlando L Otero wrote a tutorial about implementing a Multitenant architecture on top of Spring, Hibernate, and PostgreSQL. Related to Multitenancy, I found this Microsoft article from 2006 very relevant to the day.
Choosing the right entity identifier strategy requires some knowledge of the underlying JPA provider.
For this reason, if you want portability, check out how you can
replace the suboptimal
TABLE strategy with
Mike Rocke wrote a very nice review of the High-Performance Java Persistence book.
Thorben Janssen wrote a short guide which introduces several JPQL query features. For more on this topic, check out the exhaustive JPQL and HQL chapter in the Hibernate 5 User Guide.
Gregg Bolinger offers a very nice solution to truncating all tables when running integration tests with Spring Boot and Hibernate.
Hibernate entity queries are suitable when you want to modify the fetched entities, and taking advantage of the dirty checking mechanism. However, if you want to take advantage of advanced SQL query capabilities, you need native SQL queries. Check out this article to learn why native SQL queries are a Magic Wand.