EnhancementException using Javassist bidirectional association management with many-to-one in embeddable

Description

A test added for HHH-13241 is causing an EnhancementException when Javassist is used for bytecode enhancement with bidirectional association management enabled.

The association that is failing is a bidirectional one-to-many/many-to-one, where mappedBy="..." refers to a many-to-one association is in an embeddable:

NotFoundException is thrown when MethodWriter#addGetter tries to find the getter for $$_hibernate_read_employerContainer.employer in the target class, Employee, which does not exist.
Note the dot between employerContainer and employer.

Environment

Bytecode enhancement using Javassist

Activity

Show:
Gail Badner
March 13, 2019, 2:01 AM
Edited

The failure can be reproduced by running BidirectionalLazyGroupsInEmbeddableTest with -Dhibernate.bytecode.provider=javassist.

The test itself does not test bidirectional association management.

There is no failure using ByteBuddy, but I am not sure if bidirectional association management is actually working properly for this mapping.

Gail Badner
July 22, 2019, 10:40 PM

The same failure happens for the same reason in 5.1 using Javassist.

Sanne Grinovero
February 7, 2020, 2:12 PM

Considering that the use of Javassist is deprecated, should we close this?

 

Assignee

Unassigned

Reporter

Gail Badner

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major
Configure