When creating a bug report for any project within the Hibernate family, it’s extremely helpful (and, frankly, required)
to have an adequate test case available. This is obviously important to make reproducing the issue as easy as possible.
But it’s also vital longer-term. Nearly every bug fix should include a regression test, which is frequently based on the
original reproducer (sometimes, it’s the reproducer, verbatim).
To help create useful test cases, we’re opening up a repo with various templates. Please see the READMEs in each
project’s subdir for more info: Hibernate Test Case Templates
As a starting point, the repo contains two templates for ORM:
One of the fundamental principles of Hibernate/JPA is that any writes done through the Session/EntityManager APIs are collected in the persistence context and are only written to the database upon transaction commit. If needed, you can enforce the flushing of changes by explicitly invoking the flush() method. Also Hibernate may trigger a flush automatically, e.g. prior to executing a query. This strategy allows to perform many optimizations, e.g. only persisting the final state of an entity changed several times, make use of batched inserts and others.
Welcome to the second part of the NoSQL with Hibernate OGM 101 tutorial series.
In part 1 you have seen how to include Hibernate OGM in your Java project
and how simple it is to persist entities and switch between different kind of NoSQL datastores.
The first final version of Hibernate OGM is out and we’ve recovered a bit from the release frenzy. So we thought it’d be a good idea to begin the new year with a tutorial-style blog series, which shows how to get started with Hibernate OGM and what it can do for you. Just in case you missed the news, Hibernate OGM is the newest project under the Hibernate umbrella and allows you to persist entity models in different NoSQL stores via the well-known JPA.
It’s my pleasure to announce the first maintenance release of Hibernate OGM 4.1! This version makes a few more data types usable for your entity properties (float, short, char), comes with several component upgrades (Hibernate ORM 4.3.8 and Infinispan 7.0.3) and fixes some bugs.