HHH-13455 - Enabling Enhancement as a Proxy causes IllegalStateException when using Javassist
This commit is contained in:
parent
db2e8382d5
commit
beac486533
|
@ -105,7 +105,10 @@ public class PersistentAttributesEnhancer extends EnhancerImpl {
|
|||
try {
|
||||
CtClass managedCtSuperclass = managedCtClass.getSuperclass();
|
||||
|
||||
if ( !enhancementContext.isMappedSuperclassClass( managedCtSuperclass ) ) {
|
||||
if ( enhancementContext.isEntityClass( managedCtSuperclass ) ) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
else if ( !enhancementContext.isMappedSuperclassClass( managedCtSuperclass ) ) {
|
||||
return collectInheritPersistentFields( managedCtSuperclass );
|
||||
}
|
||||
log.debugf( "Found @MappedSuperclass %s to collectPersistenceFields", managedCtSuperclass.getName() );
|
||||
|
|
|
@ -24,4 +24,9 @@ public class UnloadedCtField implements UnloadedField {
|
|||
public boolean hasAnnotation(Class<? extends Annotation> annotationType) {
|
||||
return ctField.hasAnnotation( annotationType );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.ctField.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue