Introduction In this article, we are going to see how to implement a non-trivial consistency check using a PostgreSQL INSERT and UPDATE trigger. By using a database trigger after executing an INSERT or UPDATE, we can ensure that the sum of salaries in a given department does not exceed the maximum budget allocated for the given department.
Introduction If you’ve been using Hibernate for some time, there is a good chance you bumped into a MultipleBagFetchException issue: org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags In this article, we are going to see the reason Hibernate throws the MultipleBagFetchException as well as the best way to solve this issue.
Introduction While developing a Spring Boot application is rather easy, tuning the performance of a Spring Boot application is a more challenging task, as, not only it requires you to understand how the Spring framework works behind the scenes, but you have to know what is the best way to use the underlying data access framework, like Hibernate for instance. In a previous article, I showed you how easily to optimize the performance of the Petclinic demo application. However, by default, the Petclinic Spring Boot application uses the in-memory HSQLDB database, which… Read More