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.
Bytecode enhancement using Javassist
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.
The same failure happens for the same reason in 5.1 using Javassist.
Considering that the use of Javassist is deprecated, should we close this?