Red Hat

In Relation To Davide D'Alto

In Relation To Davide D'Alto

Hibernate OGM 5.2 Alpha1 is out

Posted by    |       |    Tagged as Hibernate OGM Releases

I’m happy to announce the latest release of Hibernate OGM: Hibernate OGM 5.2 Alpha1

The first thing you will notice in this release is that several dialects are not part of the core project anymore. We decided to focus our work on the Infinispan, Neo4j and MongoDB dialects.

Highlights of the release:

If you need to upgrade from a version before 5.2, you can find help on the migration notes.

All the changes are described in the release notes.

What happened to the CouchDB, Redis, Cassandra and Ehcache dialects?

They have now their own repository:

Keeping too many dialects aligned in term of features and releases is starting to impact the speed of our development. We decided to focus our attention on the most popular dialects and, at the same time, give contributors the freedom to manage the dialect without having to wait for us.

From now on, a new dialect will spend some time in its own repository and it will be included in the core project only if we consider it mature enough and, ideally, if somebody volunteers to maintain it regularly.

This also means that in the future we might not release all these dialects for each hibernate-ogm-core release.

Feel free to contact us if you have more questions about this.

Where can I get it?

You can get the required core library using the following Maven coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.2.0.Alpha1

and these are the backends currently available for 5.2.0.Alpha1:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.2.0.Alpha1

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.2.0.Alpha1

  • Infinispan

    • Embedded: org.hibernate.ogm:hibernate-ogm-infinispan:5.2.0.Alpha1

    • Remote: org.hibernate.ogm:hibernate-ogm-infinispan-remote:5.2.0.Alpha1

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.2.0.Alpha1

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.2.0.Alpha1

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.2.0.Alpha1

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.2.0.Alpha1

Alternatively, you can download archives containing all the binaries, source code and documentation from Sourceforge.

What’s next?

Our work will focus mainly on the Infinispan Remote dialect and the upgrade to Hibernate ORM 5.2.

Special thanks

I would like to thanks some contributors that helped us adding new features and fix some unexpected behaviours:

  • Hubert Holierhoek for finding ways to make the queries on Neo4j faster

  • Raghav Jha thanks to him MongoDB native queries now support Map-Reduce and distinct operations

  • Sergey Chernolyas for helping with the MongoDB dialect and the work on the OrientDB and Apache Ignite dialects (coming soon)

  • Dimitrij Drus for helping us finding some problems with polymorphic hierarchies (now fixed)

How can I get in touch?

You can find us through the following channels:

We are looking forward to hearing your feedback!

Hibernate OGM 5.1 Final is out

Posted by    |       |    Tagged as Hibernate OGM Releases

I’m happy to announce the latest stable release of Hibernate OGM: Hibernate OGM 5.1 Final

Compared to the latest candidate release, there are not many changes. You can have a look at the 5.1.0.Final changelog to get all the details.

What’s new compared to 5.0 Final?

I’m glad you asked, this version:

If you need to upgrade from a version before 5.1, you can find help on the migration notes.

Does it work with WildFly 10?

Yes, it does.

However, WildFly 10 ships with Hibernate ORM 5.0 and there are a couple of configuration steps to make it work. The easiest way is to download the WildFly modules for Hibernate ORM and Hibernate OGM ; unpack them in the modules folder of your WildFly base directory and set the following property in your persistence.xml:

<property name="jboss.as.jpa.providerModule" value="org.hibernate:5.1"/>

If you are still confused about the process, we explain it with more details in the paragraph 4.5.1. Packaging Hibernate OGM applications for WildFly 10 of the documentation.

Where can I get it?

You can get the required core library using the following Maven coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.1.0.Final

and these are the backends currently available for 5.1.0.Final:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.1.0.Final

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.1.0.Final

  • Infinispan

    • Embedded: org.hibernate.ogm:hibernate-ogm-infinispan:5.1.0.Final

    • Remote: org.hibernate.ogm:hibernate-ogm-infinispan-remote:5.1.0.Final

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.1.0.Final

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.1.0.Final

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.1.0.Final

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.1.0.Final

Alternatively, you can download archives containing all the binaries, source code and documentation from Sourceforge.

What’s next?

One of the focus of the next release will be to improve the features supported by the Hot Rod dialect.

How can I get in touch?

You can find us through the following channels:

We are looking forward to hearing your feedback!

Hibernate OGM 5.1 CR 1 is out

Posted by    |       |    Tagged as Hibernate OGM Releases

Good news!

The first candidate release for Hibernate OGM 5.1 is out.

Compared to 5.1 Beta3, this release upgrades Hibernate Search to version 5.5.6.Final and supports MongoDB aggregate operation in native queries.

You can find all the details in the 5.1.0.CR1 changelog.

If you need to upgrade from a version before 5.0, you can find help on the migration notes.

Hibernate Search 5.5.6.Final

Hibernate Search transparently indexes your data and offers fast full-text and geolocation search.

This version supports Elasticsearch.

This means that now you can use Hibernate OGM to do CRUD operations on your favourite NoSQL database while having it also transparently synchronize to an Elasticsearch cluster.

If you are not familiar with Hibernate Search you can find all the details about the latest stable version in the official blog.

Aggregation in MongoDB

MongoDB native queries now support the aggregation operation syntax.

For example, this is now a valid native query:

String nativeQuery = "db.Poem.aggregate(["
                  + "{ '$match': "
                        + "{'$or': ["
                                 + "{'author': { '$regex': 'Oscar.*', '$options': 'i'}}, "
                                 + "{ 'name': { '$regex': 'Po.*'} }"
                        + "]}}, "
                  + "{ '$sort' : { 'name' : -1 } }"
                  + "])";

List<Poem> poems = (List<Poem>) em.createNativeQuery( nativeQuery, Poem.class ).getResultList();

Where can I get it?

You can get the required core library using the following Maven coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.1.0.CR1

and these are the backends currently available for 5.1.0.CR1:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.1.0.CR1

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.1.0.CR1

  • Infinispan

    • Embedded: org.hibernate.ogm:hibernate-ogm-infinispan:5.1.0.CR1

    • Remote: org.hibernate.ogm:hibernate-ogm-infinispan-remote:5.1.0.CR1

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.1.0.CR1

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.1.0.CR1

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.1.0.CR1

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.1.0.CR1

Alternatively, you can download archives containing all the binaries, source code and documentation from Sourceforge.

What’s next?

We are going to clean up the documentation and release 5.1 Final.

After that, we will focus on Hibernate OGM 5.2 which will support Hibernate ORM 5.2

How can I get in touch?

You can find us through the following channels:

We are looking forward to hear your feedback!

Hibernate OGM 5.1 Beta3 and 5.0.4 are out

Posted by    |       |    Tagged as Hibernate OGM Releases

Hello everybody, holidays are over and we decided to start back with a small release.

Hibernate OGM 5.1 Beta3 and a new 5.0 maintainance releases are now available.

In these releases we fixed some issues around sequence generation and queries on entities using the single table per class inheritance strategy. An update is highly recommended.

Hibernate OGM 5.0.4.Final is backward compatible with 5.0.3.Final. If you need to upgrade from a version before 5.0, you can find help on the migration notes.

All the details about these releases are on the 5.0.4.Final changelog, the 5.1.0.Beta2 changelog and the 5.1.0.Beta3 changelog.

What happened to 5.1 Beta2?

Think of it as the crazy uncle nobody wants to talk about, you should check 5.1 Beta3 instead.

Where can I get them?

5.0.4.Final

You can get the required core library using the following Maven coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.0.4.Final

and these are the backends currently available:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.0.4.Final

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.0.4.Final

  • Infinispan: org.hibernate.ogm:hibernate-ogm-infinispan:5.0.4.Final

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.0.4.Final

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.0.4.Final

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.0.4.Final

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.0.4.Final

Alternatively, you can download archives containing all the binaries, source code and documentation from Sourceforge.

5.1.0.Beta3

You can get the required core library using the following Maven coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.1.0.Beta3

and these are the backends currently available for 5.1.0.Beta3:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.1.0.Beta3

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.1.0.Beta3

  • Infinispan

    • Embedded: org.hibernate.ogm:hibernate-ogm-infinispan:5.1.0.Beta3

    • Remote: org.hibernate.ogm:hibernate-ogm-infinispan-remote:5.1.0.Beta3

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.1.0.Beta3

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.1.0.Beta3

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.1.0.Beta3

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.1.0.Beta3

Alternatively, you can download archives containing all the binaries, source code and documentation from Sourceforge.

What’s next?

We are getting ready for the first 5.1 candidate release.

How can I get in touch?

You can find us through the following channels:

We are looking forward to hear your feedback!

The first hibernate OGM 5.1 Alpha and 5.0.2 Final

Posted by    |       |    Tagged as Hibernate OGM Releases

Good news!

We released Hibernate OGM 5.1 Alpha1 and 5.0.2 Final!

What’s new?

Hibernate OGM 5.0.2.Final

Hibernate OGM 5.0.2.Final now supports MongoDB 3.2 and it’s still backward compatible with Hibernate OGM 5.0.1.Final.

If you need to upgrade from a version before 5.0, you can find help on the migration notes.

The 5.0.2.Final changelog contains all the details about the changes in this release.

Hibernate OGM 5.1.0.Alpha1

Hibernate OGM 5.1.0.Alpha1 brings support for Neo4j in remote mode. The user will have the option to choose between the new Bolt protocol or the more familiar HTTP interface.

We also started to re-work the way Hibernate OGM groups operations before running them; this reduce the number of calls and commands to execute on the datastore, leading to better performance.

The 5.1.0.Alpha1 changelog contains all the details about the changes in this release.

How can I try the remote Neo4j dialect?

You can test Hibernate OGM support for Neo4j adding the following dependency to your project:

<dependency>
    <groupId>org.hibernate.ogm</groupId>
    <artifactId>hibernate-ogm-neo4j</artifactId>
    <version>5.1.0.Alpha1</version>
</dependency>

and setting the following properties:

# Required
hibernate.ogm.datastore.provider = neo4j_bolt # or neo4j_http

# Optional
hibernate.ogm.datastore.host = myproject.example.com:8989
hibernate.ogm.datastore.username = example_username
hibernate.ogm.datastore.password = example_password

You can get more information about this integration and how to configure it in the Neo4j section of the documentation.

Where can I get them?

5.0.2.Final

You can get the required core library using the following Maven coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.0.2.Final

and these are the backends currently available:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.0.2.Final

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.0.2.Final

  • Infinispan: org.hibernate.ogm:hibernate-ogm-infinispan:5.0.2.Final

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.0.2.Final

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.0.2.Final

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.0.2.Final

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.0.2.Final

Alternatively, you can download archives containing all the binaries, source code and documentation from Sourceforge.

5.1.0.Alpha1

You can get the required core library using the following Maven coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.1.0.Alpha1

and these are the backends currently available for 5.1.0.Alpha1:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.1.0.Alpha1

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.1.0.Alpha1

  • Infinispan: org.hibernate.ogm:hibernate-ogm-infinispan:5.1.0.Alpha1

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.1.0.Alpha1

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.1.0.Alpha1

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.1.0.Alpha1

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.1.0.Alpha1

Alternatively, you can download archives containing all the binaries, source code and documentation from Sourceforge.

What’s next?

The major addition in the next release will be the integration with Infinispan remote via the HotRod protocol.

How can I get in touch?

You can find us through the following channels:

We are looking forward to hear your feedback!

On the way to the remote Neo4j server integration

Posted by    |       |    Tagged as Hibernate OGM

Hibernate OGM has been able for a while to work with an embedded Neo4j instance. In the next release, we want to add the ability to connect to a remote Neo4j server.

A new binary protocol is available since Neo4j 3 to connect to a remote server: Bolt.

In addition to Bolt, Neo4j comes also with a RESTful API and we are wondering if we should add an option to switch between the two approaches.

To sum up, given the option, would you choose the RESTful API instead of Bolt to connect to Neo4j using Hibernate OGM?

This is the right time to let us know what you think.

First Hibernate OGM 5 maintenance release

Posted by    |       |    Tagged as Hibernate OGM Releases

We released Hibernate OGM 5.0.1.Final!

What’s new?

Here some of the most interesting bug fixes and improvements in this release:

  • OGM-818 - Autodetection support for @Entity annontated classes will now work

  • OGM-356 - Object comparison in JPQL queries for MongoDB and Neo4j

  • OGM-1065 - You can now use Hibernate OGM with Cassandra 3 (Thanks joexner!)

You can find all the details in the changelog.

This release is backward compatible with Hibernate OGM 5.0.0.Final but if you need to upgrade from a previous version, you can find help on the migration notes.

Where can I get it?

You can get Hibernate OGM 5.0.1.Final core via Maven using the following coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.0.1.Final

and these are the back-ends currently available:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.0.1.Final

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.0.1.Final

  • Infinispan: org.hibernate.ogm:hibernate-ogm-infinispan:5.0.1.Final

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.0.1.Final

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.0.1.Final

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.0.1.Final

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.0.1.Final

Alternatively, you can download archives containing all the binaries, source code and documentation from SourceForge.

How can I get in touch?

You can find us through the following channels:

We are looking forward to hear your feedback!

Hibernate OGM 5 is out!

Posted by    |       |    Tagged as Hibernate OGM Releases

Hibernate OGM 5.0.0.Final is finally here!

What’s new?

Compared to the 4.2.Final, this version includes:

There are also several bug fixes and you can find all the details in the changelog.

A nice Getting started guide is available on our website for people who want to start playing with it. A more in depth explanation of all the details around Hibernate OGM is in the reference documentation.

If you need to upgrade from a previous version, you can find help on the migration notes.

What’s coming next?

Now that Hibernate OGM 5 is out, we can focus on working on some new integrations like Neo4j remote and Hot Rod.

You can also have a look at the roadmap for up-to-date news about what’s coming next.

If you think that something is missing or if you have some opinion about what we should include, please, let us hear your voice.

Where can I get it?

You can get Hibernate OGM 5.0.0.Final core via Maven using the following coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.0.0.Final

and these are the back-ends currently available:

  • Cassandra: org.hibernate.ogm:hibernate-ogm-cassandra:5.0.0.Final

  • CouchDB: org.hibernate.ogm:hibernate-ogm-couchdb:5.0.0.Final

  • Infinispan: org.hibernate.ogm:hibernate-ogm-infinispan:5.0.0.Final

  • Ehcache: org.hibernate.ogm:hibernate-ogm-ehcache:5.0.0.Final

  • MongoDB: org.hibernate.ogm:hibernate-ogm-mongodb:5.0.0.Final

  • Neo4j: org.hibernate.ogm:hibernate-ogm-neo4j:5.0.0.Final

  • Redis: org.hibernate.ogm:hibernate-ogm-redis:5.0.0.Final

Alternatively, you can download archives containing all the binaries, source code and documentation from SourceForge.

How can I get in touch?

You can find us through the following channels:

We are looking forward to hear your feedback!

We are getting closer and closer to the final release of Hibernate OGM 5.

This release includes support for Redis Cluster and a new dialect to store data within Redis hashes; java.util.UUID are now using the native uuid type in Apache Cassandra; more queries are now supported using the MongoDB CLI syntax.

This release is also aligned to the Hibernate 5 family and it will work with Hibernate ORM 5, Hibernate Search 5.5 and the latest WildFly 10. Check the previous post for more details about it.

The migration notes contains more information about migrating from earlier versions of Hibernate OGM to 5.x.

Have a look at the change log for a list of everything included in this release.

Redis Cluster support

Enabling the support for Redis Cluster is a matter of setting the following property to true:

hibernate.ogm.redis.cluster = true

When this property is enabled, data will be stored across Redis cluster nodes according to the Redis key distribution model on the hash slot of the key of each entity.

Check the documentation for more details about the configuration options for Redis in Hibernate OGM.

Redis hash mapping

When using this mapping, data is stored using key-values pairs using Redis hashes. The benefit of this approach is that it allows partial updates.

You can enable this dialect setting the following property:

hibernate.ogm.datastore.grid_dialect = org.hibernate.ogm.datastore.redis.RedisHashDialect

This will map the following entity:

@Entity
public class News {

    @Id
    private String id;

    @Version
    @Column(name="version")
    private int version;

    private String title;

    private String description;

    //getters, setters ...
}

with the following properties:

version     = 1
title       = On the merits of NoSQL
description = This paper discuss why NoSQL will save the world for good

A huge thanks to community member Mark Paluch, responsible for both these great improvements in the Redis area. Note that these features are both experimental for the time being.

Additional MongoDB native CLI queries support

Thanks to the contribution of Thorsten Möller, Hibernate OGM now supports more type of queries using the MongoDB CLI syntax: findOne, findAndModify, insert, remove and update.

Here an example showing how you can use them:

OgmSession session = ...

String nativeQuery = "db.OscarWilde.findAndModify({"
        + "'query': {'author': 'oscarwilde'}, "
        + "'update': { '$set': { 'author': 'Oscar Wilder' } }, "
        + "'new': true "
        + "})";

Query query = session.createNativeQuery( nativeQuery ).addEntity( OscarWilde.class );
List<OscarWilde> result = query.list();

You can find more details in the documentation about experimental support of native MongoDB queries.

What’s coming next?

We are working on the Neo4j remote dialect and we are focused on releasing a stable version of Hibernate OGM 5.

Where can I get it?

You can get Hibernate OGM 5.0.0.CR1 via Maven etc. using the following coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.0.0.CR1 for the Hibernate OGM core module

  • org.hibernate.ogm:hibernate-ogm-<%BACKEND%>:5.0.0.CR1 for the NoSQL backend you want to use, with _<%BACKEND%> being one of "mongodb", "redis", "neo4j", etc.

Alternatively, you can download archives containing all the binaries, source code and documentation from SourceForge.

How can I get in touch?

You can get in touch through the following channels:

We are looking forward to hear your feedback!

It’s 3 days from Christmas and as a present we decided to release the first Beta of Hibernate OGM 5!

The major news in this release is the mapping support for Cassandra 2.2 new data types, proper handling of the @Lob annotation, post-load event support and Infinispan 8.

This release also continue the process of aligning Hibernate OGM to the Hibernate 5 family. After the passage to Hibernate ORM 5 in the previous release, we updated Hibernate Search to the 5.5 version that also includes the power of Apache Lucene 5.

In the previous release post we described the improvements about storing map-typed properties on MongoDB and Redis. We have now applied the same natural mapping on CouchDB.

Check out the Hibernate OGM migration notes to learn more about migrating from earlier versions of Hibernate OGM to 5.x.

Cassandra 2.2 new data types

  • date for properties mapped using @Temporal(TemporalType.DATE)

  • time for properties mapped using @Temporal(TemporalType.TIME)

  • tinyint for java.lang.Byte

  • smallint for java.lang.Short

PostLoad event support

Thanks to David Williams contribution, the @PostLoad annotation will now work with Hibernate OGM.

If you are not familiar with this annotation, it’s part of the JPA spec and it allows to specify callback methods for the corresponding lifecycle event.

@Entity
public class Zoo {

   @Id
   private Integer id;

   @ElementCollection
   private Set<Animal> animals = new HashSet<Animal>();

   private int nrOfAnimals;

   ...

   @PostLoad
   public void postLoad() {
       nrOfAnimals = animals.size();
   }
}

The postLoad() method will be called after all the eagerly fetched fields of the class Zoo have been loaded from the datastore allowing us to inizialize the value of the attribute nrOfElement.

Note that this code follows the JPA spec and it could be use in the same way with Hibernate ORM or any other JPA compliant project.

How can I add support for a new data store?

I’m glad you ask, community member Mark Paluch contributed to the documentation adding a new section that explains the different components involved in the creation of a new backend: How to build support for a data store

What’s coming next?

The major features we are planning to include in the next release are the support for the Neo4j remote server and an alternative dialect for Redis which persists values right into hash fields.

Where can I get it?

You can retrieve Hibernate OGM 5.0.0.Beta1 via Maven etc. using the following coordinates:

  • org.hibernate.ogm:hibernate-ogm-core:5.0.0.Beta1 for the Hibernate OGM core module

  • org.hibernate.ogm:hibernate-ogm-<%BACKEND%>:5.0.0.Beta1 for the NoSQL backend you want to use, with <%BACKEND%> being one of "mongodb", "redis", "neo4j" etc.

Alternatively, you can download archives containing all the binaries, source code and documentation from SourceForge.

As always, we are looking forward to your feedback. The change log tells in detail what’s in there for you. Get in touch through the following channels:

back to top