How To use @Formula in Hibernate
Overview From the official documentation, a Formula mapping defines a “derived” attribute (that means, not persisted), whose state is determined from other columns and functions when an entity is read from the database. You’d probably know other annotation that make a field not persisted to the database: @Transient. While they both allow you to create … Read more