Cache synchronization using jOOQ and PostgreSQL functions

Introduction In this article, we are going to see how we can achieve cache synchronization with the help of jOOQ and PostgreSQL functions. By using Change Data Capture, we can track how table records change over time and synchronize the application-level cache entries that were built from the table records in question.

How to synchronize bidirectional entity associations with JPA and Hibernate

Introduction While answering this StackOverflow question, I realized that it’s a good idea to summarize how various bidirectional associations should be synchronized when using JPA and Hibernate. Therefore, in this article, you are going to learn how and also why you should always synchronize both sides of an entity relationship, no matter if it’s @OneToMany, @OneToOne or @ManyToMany.