diff --git a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/integration/QuarkusEnhancementContext.java b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/integration/QuarkusEnhancementContext.java index 3afc9e59e5c5b..4a42c87dac784 100644 --- a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/integration/QuarkusEnhancementContext.java +++ b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/integration/QuarkusEnhancementContext.java @@ -33,9 +33,11 @@ public UnsupportedEnhancementStrategy getUnsupportedEnhancementStrategy() { // Lack of enhancement could lead to many problems, // from bad performance, to Quarkus-specific optimizations causing errors/data loss, // to incorrect generated bytecode (references to non-existing methods). - // If something prevents enhancement, it's just safer to have Hibernate ORM's enhancer fail + // For backwards compatibility reason, in this branch we adopt the legacy behavior of Hibernate ORM, + // which is to try to enhance all classes, ignoring any known issue. + // However, later versions of Quarkus (3.17+ at least) just have Hibernate ORM's enhancer fail. // with a clear error message pointing to the application class that needs to be fixed. - return UnsupportedEnhancementStrategy.FAIL; + return UnsupportedEnhancementStrategy.LEGACY; } }