How to generate DAOs and queries with Hibernate
|

How to generate DAOs and queries with Hibernate

Executing a query with Hibernate requires several lines of repetitive boilerplate code, and many developers have complained about that for years. You have to instantiate a Query object and set all bind parameter values before you can finally execute the query. Since version 6.3.1, Hibernate has solved this with an improved metamodel generator that provides…

11 JPA and Hibernate query hints every developer should know
| |

11 JPA and Hibernate query hints every developer should know

JPA and Hibernate support a set of hints that you can use to provide additional information to your persistence provider to influence the execution of a query. You can use them for lots of different things, like setting a timeout for your query, using an entity graph, or defining the caching of a query result….

Hibernate Performance Tuning – 2024 Edition
| |

Hibernate Performance Tuning – 2024 Edition

Based on most discussions online and at conferences, there seem to be 2 kinds of projects that use Hibernate for their persistence layer: So, what’s the difference between these projects? Are the projects in the 2nd group more complex or have higher performance requirements? No, based on my consulting projects, that’s not the case. On…

Using Window Functions with Hibernate 5 & 6
|

Using Window Functions with Hibernate 5 & 6

SQL is an incredibly powerful query language. It provides sheer endless possibilities to extract and transform information. One example of that is a window function. It enables you to perform operations on subsets of the table rows available in your query. The PostgreSQL documentation explains window functions as: A window function performs a calculation across a set…