Skip to content

Files

HibernateSpringBootCalculatePropertyGenerated

How To Calculate Property via JPA @PostLoad

Description: This application is an example of calculating transient properties of an entity based on the persistent entity attributes. In this case, we will use JPA, @PostLoad.

Key points:
- annotate the non-persitent fields and properties with @Transient
- define a method annotated with @PostLoad that calculates these transient properties based on the persistent entity attributes