Entity class not enhanced when entity superclass enhanced before

Description

Similar to but in this case an entity subclass is incorrectly assumed to be enhanced when the entity superclass has been enhanced already.

Suggested fix is to check for the Managed interface on the class only instead of on the class and its superclasses:

{{ private boolean alreadyEnhanced(CtClass managedCtClass) {
try {
String targetClassName = Managed.class.getName();
for (CtClass managedCtClassInterface: managedCtClass.getInterfaces()) {
if ( PersistentAttributesHelper.isAssignable( managedCtClassInterface, targetClassName ) ) {
return true;
}
}
}
catch (NotFoundException e) {
// keep going
}
return false;
}
}}

Environment

None

Status

Assignee

Luis Barreiro

Reporter

Fred van Engen

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

Yes, likely

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure