How to handle polymorphic associations in Hibernate with Jackson serialization and Lombok in Spring Boot?
I’m working on a Spring Boot application where I need to handle a polymorphic association between a ‘Session’ entity and two types of users: ‘User’ and ‘VirtualUser’. Both User and VirtualUser inherit from an abstract class UserRepresentation. I am using Hibernate for ORM, Jackson for JSON serialization, and Lombok for boilerplate code reduction.