One of very popular pitfalls of database object mappers is the number of executed queries before constructing final entity. In Hibernate with FetchMode enum we can control better the quantity of queries executed against the database. However, in some cases we can need some supplementary help in the form of result transformers.
Relation database management systems (RDBMS) are based on relational model. Naturally, all mapping systems must be able to represent these relationships on application layer. JPA defines several ways to do that, but all have some common points. One of them is the technique of fetching associated data.
Working with databases implies the respect of ACID principle. One of "tools" used to ensure this respect are transactions.
Almost every time we use auto increment keys (or serial in PostgreSQL). But Hibernate allows three more choices to handle primary key generation of entity objects. This article will show it.
In the previous articles we were working with Hibernate's specific elements as Session or SessionFactory. But they are not the only possible choices. We can too opt for working with Hibernate's implementation of JPA specification.
When multiple operations must be processed at once, it's better to do it automatically. This type of operations is called batch (do not confuse with bash which is a command language).
Locking is very useful for the applications based on concurrency. Thanks to it, we can avoid the collision being a results from simultaneous updates to the same data by two or more different users.
There are two ways to handle persistence in Hibernate: session and entity manager. Through this article, we'll see the differences between this two mechanisms.