We're updating the issue view to help you get more done. 

User types built using 5.1 are not binary compatible with 5.3

Description

The issue is primarily that org.hibernate.type methods used SessionImplementor arguments in 5.1 .were changed to SharedSessionContractImplementor in 5.3.

In the process of investigating the impact of making user types binary compatible, I've been reviewing the various ways that Hibernate supports implementing user types.

User types are supported for: basic types, composite types, and collection types.

The user guide mentions:

  • implementing BasicType

  • implementing UserType

  • implementing VersionType

  • implementing UserVersionType

  • implementing UserCollectionType

  • extending AbstractStandardBasicType

  • extending AbstractSingleColumnStandardBasicType

  • extending PersistentBag (internal!?!)

  • SqlTypeDescriptor (examples using existing classes)

  • implementing a JavaTypeDescriptor<T> by extending AbstractTypeDescriptor<T>

Also, org.hibernate.usertype contains:

  • CompositeUserType

  • ParameterizedType

  • DynamicParameterizedType

  • LoggableUserType

  • Sized

  • EnhancedUserType extends UserType


In addition, the testsuite includes a user type that extends org.hibernate.type.SerializableToBlobType.

In order to make user types built in 5.1 binary compatible with 5.3, we should make sure that the following packages are binary compatible:

1) org.hibernate.type
1.1) excluding CompositeType and its subclasses (i.e., ComponentType, AnyType, EmbeddedComponentType, ObjectType)
1.2) excluding AssociationType and its subclasses (EntityType, CollectionType, AnyType and their subclasses)
1.3) excluding CustomUserType, CompositeCustomType, and CustomCollectionType (intended to be used internally by Hibernate)
1.4) excluding nested "spi" and "internal" folders

2) org.hibernate.usertype

3) org.hibernate.collection, including nested "spi" and "internal" folders (since the user guide mentioned extending PersistentBag).

Environment

None

Status

Assignee

Gail Badner

Reporter

Gail Badner

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major