when CDI is missing, don't create default constructor for injection

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-03-30 23:47:44 +01:00
parent 6c91c0c234
commit c945b16b4f
1 changed files with 2 additions and 1 deletions

View File

@ -535,7 +535,8 @@ public class AnnotationMetaEntity extends AnnotationMeta {
sessionType = HIB_STATELESS_SESSION;
addDaoConstructor( null );
}
if ( jakartaDataRepository && !quarkusInjection ) {
if ( jakartaDataRepository && !quarkusInjection
&& context.addDependentAnnotation() ) {
addDefaultConstructor();
}
}