How to map calculated properties with Hibernate @Generated annotation

Introduction As I explained in this previous article, you can map calculated properties using Hibernate @Formula, and the value is generated at query time. In this post, you’ll see how you can calculate an entity property at INSERT or UPDATE time.

Spring Boot Webinar
50 free licenses of Hypersistence Optimizer for my newsletter subscribers. The coupon goes out on 18 November. Subscribe