JPA is the main building block in most Java projects. However, a lot of developers still use it without a deep understanding of the technology, relying mainly on applying the copy-paste methodology from StackOverflow or existing system entities. During this presentation, I will consolidate knowledge about object-relational mapping. We'll see how lazy loading works under the hood and understand the difference between a set, list or bag. We will also talk about common traps leading to significant decreases in performance or improper behaviour of the system.