Version 30

    This document describes changes in API, SPI, configuration properties etc. which may affect users when upgrading to a new version of Hibernate OGM.

    • 5.2.x
    • MongoDB
    • 5.1.x
      • 5.2.0 Alpha1
        • Core/General
          • Upgrade Hibernate ORM to 5.1.10.Final
          • Upgrade Hibernate Search to 5.6.2.Final
          • Moved CouchDB, Ehcache, Cassandra and Redis dialects in separate repositories:
      • 5.1.0.CR1
        • Upgrade to Hibernate Search 5.6  and Lucene 5.5
      • 5.1.0.Beta3
        • MongoDB
          • Update driver to connect to MongoDB 3.4
      • 5.1.0.Beta1
        • no changes affecting migration
      • 5.1.0.Alpha1
        • Core/General
          • 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
        • SPI changes
          • 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"})
          • MongoDB, CouchDB: Nested embeddables in embedded collections get now stored with the correct mapping, see [OGM-669] Improve mapping of nested embeddables within element collections in document stores - Hibernate JIRA; Previously, properties of nested embeddables in element collections were wrongly "flattened", now the nesting structure is correctly maintained
        • MongoDB driver is now 2.13 and supports MongoDB 3.0 credentials (this change is backward compatible with MongoDB 2.x)
        • Default credentials strategy is now BEST (i.e. negotiated with the server, this change is backward compatible with MongoDB 2.x)
        • WriteConcernType.ERRORS_IGNORED is deprecated and won't be supported in the next version
        • hibernate.ogm.datastore.port is now deprecated, prefer hibernate.ogm.datastore.host somehost:489
      • 4.2.0.Beta1
        • At least JDK 7 is required now for using Hibernate OGM
        • 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
      • 4.1.0.CR1
        • Storage strategies:
        • API changes
          • Moved org.hibernate.ogm.cfg.DocumentStoreProperties to org.hibernate.ogm.datastore.document.cfg.DocumentStoreProperties
        • SPI changes
          • Renamed org.hibernate.ogm.datastore.document.association.spi.SingleColumnAwareAssociationRowFactory to org.hibernate.ogm.datastore.document.association.spi.StructureOptimizerAssociationRowFactory
          • Changed from class to interface
            • org.hibernate.ogm.model.key.spi.AssociatedEntityKeyMetadata
            • org.hibernate.ogm.model.key.spi.AssociationKeyMetadata
            • org.hibernate.ogm.model.key.spi.AssociationKeyMetadata$Builder
            • org.hibernate.ogm.model.key.spi.EntityKeyMetadata
            • org.hibernate.ogm.model.key.spi.IdSourceKeyMetadata
          • org.hibernate.ogm.model.spi.Association: Return type of method 'public java.util.Set getKeys()' has been changed to java.lang.Iterable
          • org.hibernate.ogm.model.spi.AssociationOperationType: Removed field PUT_NULL, use REMOVE instead (setting a value to null is the same as removing it)
          • org.hibernate.ogm.model.spi.AssociationSnapshot: Return type of method 'public java.util.Set getRowKeys()' has been changed to java.lang.Iterable
          • org.hibernate.ogm.dialect.spi.GridDialect
            • Added method 'public org.hibernate.ogm.dialect.spi.DuplicateInsertPreventionStrategy getDuplicateInsertPreventionStrategy(org.hibernate.ogm.model.key.spi.EntityKeyMetadata)'
      • 4.1.0.Beta8
        • API changes
          • Renamed org.hibernate.ogm.dialect.queryable to org.hibernate.ogm.dialect.query
          • Changes to interface org.hibernate.ogm.OgmSession
            • Added 'public org.hibernate.ogm.OgmSessionFactory getSessionFactory()'
        • SPI changes:
          • 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 a org.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:
          • hibernate.ogm.infinispan.configuration_resource_name, hibernate.ogm.infinispan.cachemanager_jndi_name
          • hibernate.ogm.ehcache.configuration_resource_name
          • hibernate.ogm.mongodb.association_document_storage
          • hibernate.ogm.neo4j.configuration_resource_name, hibernate.ogm.neo4j.database_path
        • 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.