diff --git a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/FastBootMetadataBuilder.java b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/FastBootMetadataBuilder.java index deacc211d10b8..af2232069f856 100644 --- a/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/FastBootMetadataBuilder.java +++ b/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/FastBootMetadataBuilder.java @@ -250,10 +250,18 @@ private MergedSettings mergeSettings(PersistenceUnitDescriptor persistenceUnit) } cfg.put(WRAP_RESULT_SETS, "false"); - if (readBooleanConfigurationValue(cfg, XML_MAPPING_ENABLED)) { - LOG.warn("XML mapping is not supported. Setting " + XML_MAPPING_ENABLED + " to false."); + //Hibernate Envers requires XML_MAPPING_ENABLED to be activated, but we don't want to enable this for any other use: + if (isEnversPresent) { + if (readBooleanConfigurationValue(cfg, XML_MAPPING_ENABLED)) { + LOG.warn( + "XML mapping is not supported. It will be partially activated to allow compatibility with Hibernate Envers, but this support is temporary"); + } + } else { + if (readBooleanConfigurationValue(cfg, XML_MAPPING_ENABLED)) { + LOG.warn("XML mapping is not supported. Setting " + XML_MAPPING_ENABLED + " to false."); + } + cfg.put(XML_MAPPING_ENABLED, "false"); } - cfg.put(XML_MAPPING_ENABLED, "false"); // Note: this one is not a boolean, just having the property enables it if (cfg.containsKey(JACC_ENABLED)) {