This release introduce the concept of GroupingOperation adding new interfaces that will be used by some dialects. It's been added to MongoDB, CouchDB and Redis.

SPI Changes

the interface org.hibernate.ogm.datastore.spi.SchemaDefiner$SchemaDefinitionContext has a new method getTableEntityTypeMapping()

In many different places methods returning or expecting a org.hibernate.ogm.model.spi.Tuple are now returning a org.hibernate.ogm.entityentry.impl.TuplePointer. You can get the tuple via the method TuplePointer#getTuple().

New class org.hibernate.ogm.dialect.spi.TupleTypeContext. This class replace TupleContext when the context depends only by the type of the tuple

Neo4j

Upgrade to Neo4j 3.0

MongoDB

Update driver to connect to MongoDB 3.3

Cassandra

Update driver to connect to Cassandra 3.1

5..0.x

5.0.0.Final

Running Hibernate OGM 5.0x on WildFly

requires WildFly 10 (or JBoss EAP7)

requires to set the following option in the persistence.xml: <property name="jboss.as.jpa.providerModule" value="application" />

GridDialect: the forEachTuple method now requires a TupleContext parameter and can only work on one entity type at a time

5.0.0.Beta1

Core/General

This release upgrades to Hibernate Search 5.5; Hence check out the migration notes

Primitive types mapped with @Lob will now be stored as byte arrays or character type; before this was only implemented for byte[] or Byte types

CouchDB

For map-typed associations an improved persistence mapping is used now in case they use a single key column of type String; If needed, the previous approach can be enforced by setting "hibernate.ogm.datastore.document.map_storage" to the value "AS_LIST"; To do: Add link to ref guide

Cassandra

Updated the driver to connect to Cassandra 2.2

Mapping using new data types:

java.lang.Byte is now mapped as a tinyint

java.lang.Short is now mappend as a smallint

@Temporal(TemporalType.TIME) is now mapped as time

@Temporal(TemporalType.DATE) is now mapped as date

Infinispan

Update to version 8.0.2

5.0.0.Alpha1

Core/General

This release is based on Hibernate ORM 5; Hence check out the ORM migration notes

Some methods have been removed from Configuration and thus OgmConfiguration; Preferably MetadataSources/StandardServiceRegistryBuilder should be used now when bootstrapping Hibernate OGM via the Hibernate API (none JPA environment) as shown in the reference documentation

The module/slot name of the Hibernate OGM core module (to be used with WildFly) has been changed from org.hibernate:ogm to org.hibernate.ogm:main

MongoDB

Driver 3.0.3 is used now, Fongo test backend is at 2.0.2

The configuration property "hibernate.ogm.mongodb.connection_timeout" has been removed in favor of the more generic "hibernate.ogm.mongodb.driver.*" option namespace which allows to specify a wider range of connection properties (see OGM-810)

For map-typed associations an improved persistence mapping is used now in case they use a single key column of type String; If needed, the previous approach can be enforced by setting "hibernate.ogm.datastore.document.map_storage" to the value "AS_LIST"; To do: Add link to ref guide

SPI

SchemaDefiner/BaseSchemaDefiner: initializeSchema() is expecting an instance of Database now

DatastoreProvider has new method getTransactionCoordinatorBuilder()

4.2.x

4.2.0.Final

No changes affecting migration

4.2.0.CR1

Storage strategies:

Neo4j: change the way a collection inside an embedded get stored because of a bugfix. Previously,. a collection inside an embedded would result in something like (order:Order:ENTITY) -[:shippingAddress.phone.alternatives]-> (:EMBEDDED { shippingAddress.phone.alternatives: "ajsfh"}) instead of (order:Order:ENTITY) -[:shippingAddress] ->(:EMBEDDED) -[:phone]-> (:EMBEDDED) -[:alternatives]-> (:EMBEDDED {alternatives: "akslh"})

SessionFactoryImplementor has been removed from the interfaces extended by OgmSessionFactory; It had been accidentally exposed there and was removed because OgmSessionFactory as a user-facing API should not expose an SPI-level contract

4.1.x

4.1.1.Final

No changes affecting migration

4.1.0.Final

Dependencies changes

Update Hibernate Search to version 5.0.0.Final

Update Infinispan to version 7.0.2.Final

Because of the Infinispan and Hibernate Search upgrades, this version is not compatible with EAP 6 and therefore the corresponding JBoss module has not been included in the distribution

Neo4j embedded has a dependency to a verion of Lucene not compatible with the current Hibernate Search. For this reason Neo4j embedded and the latest Hibernate Search cannot be used in the same application

We renamed some classes in the package org.hibernate.ogm.dialect.batch.spi:

UpdateTupleOperation to InsertOrUpdateTupleOperation

UpdateAssociationOperation to InsertOrUpdateAssociationOperation

Changes to org.hibernate.ogm.dialect.spi.GridDialect:

Parameter 1 of 'public boolean isStoredInEntityStructure(org.hibernate.ogm.model.key.spi.AssociationKey, org.hibernate.ogm.dialect.spi.AssociationContext)' has changed its type to org.hibernate.ogm.model.key.spi.AssociationKeyMetadata

Parameter 2 of 'public boolean isStoredInEntityStructure(org.hibernate.ogm.model.key.spi.AssociationKey, org.hibernate.ogm.dialect.spi.AssociationContext)' has changed its type to org.hibernate.ogm.dialect.spi.AssociationTypeConte

Changes to org.hibernate.ogm.dialect.spi.TupleContext

Changed from class to interface

Removed org.hibernate.ogm.dialect.spi.GridDialectOperationContext from the set of implemented interfaces

Changes to org.hibernate.ogm.dialect.spi.AssociationContext

Changed from class to interface

Removed org.hibernate.ogm.dialect.spi.GridDialectOperationContext from the set of implemented interfaces

org.hibernate.ogm.model.key.spi.AssociationKeyMetadata has to be instantiated using aorg.hibernate.ogm.model.key.spi.AssociationKeyMetadata.Builder

4.1.0.Beta7

This release introduces clearly defined and separated APIs, SPIs and implementation parts. While clearly distinguishing between this categories of classes is highly beneficial, it required us to re-organize the existing package structure as described in the following. In general, very few changes have been done to API types, whereas SPI types have been re-located to different packages in many cases. So SPI users should be able to accomodate to the most changes in this release by choosing the "Organize imports" functionality from their IDE.

The former (API = application programming interface) are those classes/interfaces you as a user of Hibernate OGM are supposed to interact with, in addition to the APIs defined by JPA and Hibernate ORM. API types are all types which are not located within an "spi" or an "impl" package. The following changes have been applied to API types:

OptionConfigurator has been moved to org.hibernate.ogm.cfg (it had wrongly been classified as SPI before)

Many types which actually are considered internal, had been located in API packages before and have been moved to an "impl" package now. As these types were not meant to be accessed by users anyways, there should be no impact. If you accessed one of those types and think it has been required to do so, please let us know so we can discuss whether we need to establish any additional APIs or SPIs.

The latter (SPI = service provider interface) are those classes/interfaces you as an author of a custom dialect for Hibernate OGM are supposed to interact with. SPI types are all types which are located within an "spi" package. The following changes have been applied:

GridDialect and related types have been re-located to org.hibernate.ogm.dialect.spi; The dialect facet contracts for batchable and queryable dialects live in org.hibernate.ogm.dialect.batchable.spi and org.hibernate.ogm.dialect.queryable.spi

Removed method GridDialect#createAssociationTuple() (it is not needed any longer) and renamed updateTuple()/updateAssociation() to insertOrUpdateTuple()/insertOrUpdateAssociation()

Consumer has been renamed to ModelConsumer

The model types for representing tuples, associations and so own as well as their keys have been re-located to org.hibernate.ogm.model.spi

SchemaDefiner and related types have been re-located to org.hibernate.ogm.datastore.spi

The previous class ConfigurationContext has been changed into the interface org.hibernate.ogm.options.navigation.spi.ConfigurationContext

ConfigurationPropertyReader and related types have been moved to oorg.hibernate.ogm.util.configurationreader.spi

4.1.0.Beta1

Configuration properties common to all/most stores have been consolidated and are now named hibernate.ogm.datastore.*: hibernate.ogm.datastore.provider, hibernate.ogm.datastore.host, hibernate.ogm.datastore.port, hibernate.ogm.datastore.database, hibernate.ogm.datastore.username, hibernate.ogm.datastore.password and hibernate.ogm.datastore.create_database

The contents of each backend module is organized under one root package in the form org.hibernate.ogm.datastore.<provider>.*, e.g. org.hibernate.ogm.datastore.infinispan.*; If you're referencing the DatastoreProvider or GridDialect type by its class name, make sure to update these references

The names of the following properties have been aligned to follow a consistent style:

Types declaring property constants have been renamed from Environment to OgmProperties, InfinispanProperties, MongoDBProperties etc. and moved to org.hibernate.ogm.cfg and the root package of each datastore module, respectively, e.g. org.hibernate.ogm.datastore.mongodb etc.