| Similar to
HHH-10977 Closed but in this case an entity superclass is incorrectly assumed to be enhanced when the entity subclass 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; } }} |