Bio
I am member of the Hibernate Team at Red Hat, primarily working on Hibernate OGM, Hibernate Validator and Hibernate Search. I'm also serving in the JSR 349 expert group (Bean Validation).
In my spare time I lead the MapStruct project, a code generator for bean to bean mappings.
Tags
Authors
The other day I came across an interesting mapping challenge which I thought may be worth sharing. If you are a seasoned JPA user, it will probably be nothing new to you, but those not as experienced may find it helpful :)
TL;DR - JPA let’s you override database columns for embedded objects but also for collections of embedded objects; @AttributeOverride
and @AssocationOverride
can be used for that.
Let’s assume the following entity model representing a person and their home and business address:
[ ... ]
Welcome back to our tutorial series “NoSQL with Hibernate OGM”!
I am pleased to announce the release of Hibernate OGM 4.2.0.CR1.
I am happy to announce the release of Hibernate OGM 4.1.3 Final and 4.2.0.Beta1!
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.
It’s my pleasure to announce the release of Hibernate OGM 4.1.2!
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.
It’s my great pleasure to announce the release of Hibernate OGM 4.1.0.Beta7! The release brings support for MongoDB’s object id, a clarification of what are our public API/SPI packages as well as several bugfixes and many other improvements.
The Hibernate team is very happy to announce the release of another Beta of Hibernate OGM 4.1!