The best way to use the Spring Transactional annotation
Introduction In this article, I’m going to show you the best way to use the Spring Transactional annotation. This is one of the best practices I applied when developing RevoGain, a web application that allows you to calculate the gains you realized while trading stocks, commodities, or crypto using Revolut.
Hibernate LazyToOne annotation
Introduction In this article, I’m going to explain how the Hibernate LazyToOne annotation works and why you should use NO_PROXY lazy loading with bytecode enhancement. Before Hibernate 5.5, without the LazyToOneOption.NO_PROXY annotation, the parent-side of a @OneToOne association is always going to be fetched eagerly even if you set it to FetchType.LAZY and enabled bytecode enhancement lazy loading. Since Hibernate 5.5, you no longer need to use LazyToOneOption.NO_PROXY with bytecode enhancement.