How to join unassociated entities with JPA and Hibernate
| |

How to join unassociated entities with JPA and Hibernate

Representing associations between entities as attributes is one of the most comfortable and popular features of JPA and Hibernate. It makes it very easy to navigate from one entity to one or more associated entities in your Java code, like from a Person entity to the corresponding Address entity. You can also use the association…

How to call custom database functions with JPA and Hibernate
| |

How to call custom database functions with JPA and Hibernate

JPA supports a set of database functions which you can use to perform small operations and transformations within a query. This is often easier and faster than doing it in the Java code. But how do you call functions which are not supported by the JPA standard, like database-specific ones or the custom functions implemented…

| | |

Free Mini Course: How to find and fix n+1 select issues with Hibernate

Loading related entities with JPA and Hibernate is a comfortable feature that is also the most common reason for performance issues. In most applications you can find one of these two issues: related entities are eagerly loaded, even if they are not needed or related entities are lazily loaded which creates n+1 select issues if…