Maps with Spring Data JPA
March 18, 2024
Introduction # This small article explores one way of using Maps for data modelling in a JPA (Java Persistence API) based application. Model # Imagine we have the following data model: classDiagram User "1" *-- "*" Account : manages This means: A user has one bank account per account type. Accounts do not need to be aware of their ‘owner’. We need to have access to all user accounts, preferably by account type. ...