I added another two Examples of what I think is caused by the same bug.
The relationship in these cases are OneToOne. This time made non-optional using @javax.validation.constraints.NotNull.
The first case involves derived entities using InheritanceType.JOINED. Instances of the base entity cannot be found by ID anymore.
The second case has three entities in a chain of OneToOne relationships. Here, an EntityNotFoundException is thrown because the inner join used results in zero rows (instead of the expected one).
As of my tests the latest version of hibernate not exhibiting the bug is 4.2.10.Final. It is already present in 3.0.1.Final.
|