diff --git a/tooling/metamodel-generator/src/main/java/org/hibernate/jpamodelgen/annotation/AnnotationMetaEntity.java b/tooling/metamodel-generator/src/main/java/org/hibernate/jpamodelgen/annotation/AnnotationMetaEntity.java index 0bb292d939..eb7ceb277a 100644 --- a/tooling/metamodel-generator/src/main/java/org/hibernate/jpamodelgen/annotation/AnnotationMetaEntity.java +++ b/tooling/metamodel-generator/src/main/java/org/hibernate/jpamodelgen/annotation/AnnotationMetaEntity.java @@ -302,7 +302,9 @@ public class AnnotationMetaEntity extends AnnotationMeta { } private void findSessionGetter(TypeElement type) { - if ( !containsAnnotation( type, Constants.ENTITY ) ) { + if ( !containsAnnotation( type, Constants.ENTITY ) + && !containsAnnotation( type, Constants.MAPPED_SUPERCLASS ) + && !containsAnnotation( type, Constants.EMBEDDABLE ) ) { for ( ExecutableElement method : methodsIn( type.getEnclosedElements() ) ) { if ( isSessionGetter( method ) ) { dao = true;