Red Hat

In Relation To Hibernate ORM

In Relation To Hibernate ORM

Hibernate Community Newsletter 9/2016

Posted by Vlad Mihalcea    |       |    Tagged as Discussions Hibernate ORM

Welcome to the Hibernate community newsletter in which we share blog posts, forum, and StackOverflow questions that are especially relevant to our users.

Articles

Presentations

Both Emmanuel and I have been presenting at Devoxx France, and we are going to share the videos once they are available. Meanwhile, you can checkout the slides for the High-Performance Hibernate presentation.

Hibernate Community Newsletter 8/2016

Posted by Vlad Mihalcea    |       |    Tagged as Discussions Hibernate ORM

Welcome to the Hibernate community newsletter in which we share blog posts, forum, and StackOverflow questions that are especially relevant to our users.

Articles

Presentations

Hibernate Community Newsletter 7/2016

Posted by Vlad Mihalcea    |       |    Tagged as Discussions Hibernate ORM

Welcome to the Hibernate community newsletter in which we share blog posts, forum, and StackOverflow questions that are especially relevant to our users.

Articles

Hibernate ORM 5.0.9.Final

Posted by Gail Badner    |       |    Tagged as Hibernate ORM Releases

Hibernate ORM 5.0.9.Final has just been tagged and published.

The complete list of changes can be found here (or here for people without a Hibernate Jira account).

In addition, the 5.0 Migration Guide has been updated to document migration issues when moving from earlier 5.0 releases to 5.0.8.

For information on consuming the release via your favorite dependency-management-capable build tool, see http://hibernate.org/orm/downloads/

The release bundles can be obtained from: SourceForge or BinTray.

Hibernate Community Newsletter 5/2016

Posted by Vlad Mihalcea    |       |    Tagged as Discussions Hibernate ORM

Welcome to the Hibernate community newsletter in which we share blog posts, forum and StackOverflow questions that are especially relevant to our users.

News

The new User Guide is online, and it’s now the default Hibernate reference documentation. We keep on improving it, and the next release will contain a chapter about Hibernate Spatial, a section about calling stored procedures, and an update to the Multi-tenancy chapter.

Sanne talked about Hibernate Search and Lucene at the London Lucene/Solr Meetup. I hope the recordings will be available soon.

Articles

Bozhidar Bozhanov wrote a step-by-step guide for integrating Hibernate, Spring, and Infinispan.

Dane Dennis, from JArchitect, analyzed the Hibernate Core API and concluded that Hibernate is a "good example of open source projects to learn from".

While running some tests on all major relational database systems, I bumped into a very interesting issue relating to MySQL metadata locking. The bottom line is that you a transaction should always end as otherwise locks might be held, therefore impacting other concurrent transactions.

Hibernate ORM 5.0.8.Final

Posted by Gail Badner    |       |    Tagged as Hibernate ORM Releases

Hibernate ORM 5.0.8.Final has just been tagged and published.

The complete list of changes can be found here (or here for people without a Hibernate Jira account).

As of Hibernate ORM 5.0.8.Final, Oracle12cDialect has been changed to map byte[] and Byte[] to BLOB (HHH-10345)

Previous versions of Hibernate have mapped byte[] and Byte[] to Oracle’s LONG RAW data type (via the JDBC LONGVARBINARY type). Oracle have deprecated the LONG RAW data type for many releases - possibly as far back as 8i. Therefore it was decided to start having Hibernate map byte[] and Byte[] to BLOB for Oracle.

However, in the interest of backwards compatibility and not breaking existing applications it was also decided to limit this change to just the Oracle12cDialect. So starting in 5.0.8, applications using Oracle12cDialect and implicitly mapping byte[] and Byte[] values will start seeing those handled as BLOB data rather than LONG RAW data. For existing applications that want to continue to use Oracle12cDialect and still continue to implicitly map byte[] and Byte[] attributes to LONG RAW, there is a new configuration setting you can use to enable that: hibernate.dialect.oracle.prefer_longvarbinary, which is false by default (map to BLOB).

These details regarding HHH-10345 will be added to the 5.0 Migration Guide shortly.

For information on consuming the release via your favorite dependency-management-capable build tool, see http://hibernate.org/orm/downloads/

The release bundles can be obtained from: SourceForge or BinTray.

The New Hibernate ORM User Guide

Posted by Vlad Mihalcea    |       |    Tagged as Discussions Hibernate ORM

Big news

We are glad to announce that the new Hibernate ORM User Guide has become the default Hibernate 5.1 reference documentation. This process was started last summer, and it was one of the primary goals of the Hibernate 5 project version.

What’s changed

Previously, all the documentation was written in DocBook, and we wanted to move away to a more human-friendly format. Thanks to Dan Allen and the Asciidoctor community, we now have a tool to write technical documentation where the actual content doesn’t get lost in a myriad of XML markup tags.

All the examples are embedded from unit tests which are, of course, available on GitHub. This way, we ensure that all code snippets are valid and relevant in the future as well (removing a deprecated class will trigger a test failure, and we can immediately update the broken example).

The previous documentation was featuring many XML-based examples which were no longer relevant for the vast majority of our users. Because it is very common to use Hibernate as a JPA provider, most examples are written according to the Java Persistence API specifications but, since Hibernate is more than a JPA provider, we also feature Hibernate-specific examples which cover use cases that are not supported by the JPA standard.

What’s to come

As previously stated, the User Guide is not finished yet. In the near future, we are going to enhance the following sections as well:

  • Hibernate support for calling stored procedures,

  • Migrating Hibernate Envers examples to unit tests,

  • Multi-tenancy examples,

  • A new section about Hibernate Spatial.

Enjoy reading it and we are looking forward to getting your feedback!

Hibernate Community Newsletter 4/2016

Posted by Vlad Mihalcea    |       |    Tagged as Discussions Hibernate ORM

Starting this year, we are hosting a series of articles focused on the Hibernate community. We share blog posts, forum and StackOverflow questions that are especially relevant to our users.

News

We are happy that Hibernate 5.1 is ready. The new User Guide still needs a few site-related changes in order to make the switch, so stay tuned!

Articles

Ondrej Mihályi made a summary of the differences in JPA entity locking modes.

Lorenzo Dee wrote an article about JPA pitfalls.

I wrote an article about enabling bytecode enhancement in Hibernate 5.

ORM 5.1 feature release

Posted by Steve Ebersole    |       |    Tagged as Hibernate ORM Releases

The Hibernate team is proud to announce the release of ORM 5.1 which includes a number of new features and enhancements, including:

Entity joins (or ad hoc joins)

In HQL you now have the ability to define a join to an entity, not just a mapped association. For example:

select ...
from FinancialRecord f
    left join User u
        on r.lastUpdateBy = u.username

See HHH-16 for details.

load-by-multiple-id API

Loading multiple entities of same type by identifier is now a first class API much like loading a single entity by identifier. For example:

// load Users 1, 2 and 3 at one shot
List<User> users = session.byMultipleIds(User.class)
    .multiLoad( 1, 2, 3 );

See HHH-7572 for details.

CDI integration improvements

Especially in regards to in-container integration, we have seen gaps between the JPA, CDI and EE specs in terms of timing between JPA and CDI components. Generally this manifests as Hibernate trying to access the CDI BeanManager too soon. 5.1 offers some solutions to deal with this. Long term we are working with the Weld development team to propose a solution at the JPA and CDI spec levels.

See HHH-8706 and HHH-10477 for details.

@Embeddables and all null column values

Historically Hibernate would always treat all null column values for an @Embeddable to mean that the @Embeddable should itself be null. 5.1 allows applications to dictate that Hibernate should instead use an empty @Embeddable instance. This is achieved via an opt-in setting: hibernate.create_empty_composites.enabled.

See HHH-7610 for details.

Envers audit queries can now refer to to-one associtions

When deinfing an Envers audit query you can now refer across an association.

A further performance improvement here will be for this feature to leverage the entity-join work (HHH-16) mentioned above. That work did not get done in time for inclusion in 5.1.0, but will be in 5.1.1.

See HHH-3555 for details.


In addition there have been many performance improvements and bug fixes.

There is a migration guide for migrating from 5.0→5.1. This is a temporary location; we hope to have a better option as part of http://hibernate.org longer term.

The complete list of changes can be found here (or here for people without a Hibernate Jira account).

For information on consuming the release via your favorite dependency-management-capable build tool, see http://hibernate.org/orm/downloads/

For those of you allergic to dependency-management-capable build tools, the release bundles can be obtained from SourceForge or BinTray.

back to top