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 committed by Christian Beikov
parent b2e572fc30
commit 01ee8eacd8
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();
}
}