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

Binary compatibility broken between 4.1.9 -> 4.1.10 for Restrictions.eq and Restrictions.ne

Description

When was fixed, the return types for the org.hibernate.criterion.Restrictions methods Restrictions.ne and Restrictions.eq were changed from SimpleExpression to Criterion. See the git change log here:

https://github.com/hibernate/hibernate-orm/commit/70454c9168129620089be47db0524652a4bd8c1e

Replacing the 4.1.9 build for the 4.1.10 build causes the following runtime exception when either of these Restrictions methods are invoked:

1 Caused by: java.lang.NoSuchMethodError: org.hibernate.criterion.Restrictions.eq(Ljava/lang/String;Ljava/lang/Object;)Lorg/hibernate/criterion/SimpleExpression;

and for Restrictions.ne:

1 java.lang.NoSuchMethodError: org.hibernate.criterion.Restrictions.ne(Ljava/lang/String;Ljava/lang/Object;)Lorg/hibernate/criterion/SimpleExpression;

As the version number was effectively upgraded by only a minor point release, it could be reasonably expected that this type of change would not have occurred. Would it be possible to confirm that this api breaking change was expected as part of this release and was the only possible solution to the issue.

Environment

Linux (opensuse)

java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)

Hibernate version 4.1.10

Status

Assignee

Brett Meyer

Reporter

Matt Todd

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

4.1.10

Priority

Blocker