diff --git a/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/EnhancementHelper.java b/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/EnhancementHelper.java index 6b5023edc4..927fa254e5 100644 --- a/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/EnhancementHelper.java +++ b/tooling/hibernate-gradle-plugin/src/main/groovy/org/hibernate/orm/tooling/gradle/EnhancementHelper.java @@ -71,6 +71,10 @@ public class EnhancementHelper { } }; + if ( options.getEnableExtendedEnhancement() ) { + project.getLogger().warn("Extended enhancement is enabled. Classes other than entities may be modified. You should consider access the entities using getter/setter methods and disable this property. Use at your own risk." ); + } + final Enhancer enhancer = Environment.getBytecodeProvider().getEnhancer( enhancementContext ); for ( File classesDir: sourceSet.getOutput().getClassesDirs() ) {