From c945b16b4ff4aeb3ace22b275b186efd5adb948e Mon Sep 17 00:00:00 2001 From: Gavin King Date: Sat, 30 Mar 2024 23:47:44 +0100 Subject: [PATCH] when CDI is missing, don't create default constructor for injection Signed-off-by: Gavin King --- .../hibernate/processor/annotation/AnnotationMetaEntity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMetaEntity.java b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMetaEntity.java index 0d92ef1f45..89e2055675 100644 --- a/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMetaEntity.java +++ b/tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AnnotationMetaEntity.java @@ -535,7 +535,8 @@ public class AnnotationMetaEntity extends AnnotationMeta { sessionType = HIB_STATELESS_SESSION; addDaoConstructor( null ); } - if ( jakartaDataRepository && !quarkusInjection ) { + if ( jakartaDataRepository && !quarkusInjection + && context.addDependentAnnotation() ) { addDefaultConstructor(); } }