Getting Started With Hibernate
| |

Getting Started With Hibernate

Hibernate is a very popular implementation of the Java Persistence API (JPA) standard. It acts as an additional layer on top of JDBC and enables you to implement a database-independent persistence layer. Hibernate provides an object-relational mapping implementation that maps your database records to Java objects and generates the required SQL statements to replicate all operations to the database. Let’s…

Entities or DTOs – When should you use which projection?
| |

Entities or DTOs – When should you use which projection?

JPA and Hibernate allow you to use DTOs and entities as projections in your JPQL and Criteria queries. When I talk about Hibernate performance in my online training or at a workshop, I get often asked, if it matters which projection you use. The answer is: YES! Choosing the right projection for your use case…

Map Associations with JPA and Hibernate – The Ultimate Guide
| |

Map Associations with JPA and Hibernate – The Ultimate Guide

Association mappings are one of the key features of JPA and Hibernate. They model the relationship between two database tables as attributes in your domain model. That allows you to easily navigate the associations in your domain model and JPQL or Criteria queries. JPA and Hibernate support the same associations as you know from your…