JPA

Using Custom Converter In Hibernate

Overview Imagine this scenario, you have a legacy database that store weather data. The previous developer, due to various reason, store the temperature in the following format: id location temperature […]

JPA

Using @ColumnTransformer In Hibernate

Overview One of the lesser-known yet powerful annotations in Hibernate is @ColumnTransformer. This annotation let us apply SQL transformations on entity properties when interacting with the database. You can think […]

JPA

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 […]