JPA
-
Enterprise Java
JPA Database Schema Generation
For some time now, most of the main implementations of JPA, like Hibernate, EclipseLink or OpenJPA, offered ways to generate…
Read More » -
Enterprise Java
A beginner’s guide to JPA and Hibernate Cascade Types
Introduction JPA translates entity state transitions to database DML statements. Because it’s common to operate on entity graphs, JPA allows…
Read More » -
Enterprise Java
JPA 2.1: Unsynchronized persistence context
The JPA version 2.1 brings a new way how to handle the synchronization between the persistence context and the current…
Read More » -
Enterprise Java
Hibernate Locking Patterns – How does PESSIMISTIC_READ and PESSIMISTIC_WRITE work
Introduction Java Persistence API comes with a thorough concurrency control mechanism, supporting both implicit and explicit locking. The implicit locking…
Read More » -
Enterprise Java
JPA 2.1 criteria delete/update and temporary tables in Hibernate
Since JPA version 2.0 the EntityManager offers the method getCriteriaBuilder() to dynamically build select queries without the need of string…
Read More » -
Enterprise Java
JPA Tutorial – The ULTIMATE Guide (PDF Download)
EDITORIAL NOTE: In this post, we feature a comprehensive JPA Tutorial. The Java Persistence API (JPA) is a Java programming…
Read More » -
Enterprise Java
A beginner’s guide to Java Persistence locking
Implicit locking In concurrency theory, locking is used for protecting mutable shared data against hazardous data integrity anomalies. Because lock…
Read More » -
Enterprise Java
EAGER fetching is a code smell
Introduction Hibernate fetching strategies can really make a difference between an application that barely crawls and a highly responsive one.…
Read More » -
Enterprise Java
5 ways to initialize lazy relations and when to use them
Lazy loading of relations between entities is a well established best practice in JPA. Its main goal is to retrieve…
Read More »