diff --git a/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/enhancer/HibernateEntityEnhancerPresentEmbeddableTest.java b/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/enhancer/HibernateEntityEnhancerPresentEmbeddableTest.java index 789b88ff5fb32..4f9fd280eb32d 100644 --- a/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/enhancer/HibernateEntityEnhancerPresentEmbeddableTest.java +++ b/extensions/hibernate-orm/deployment/src/test/java/io/quarkus/hibernate/orm/enhancer/HibernateEntityEnhancerPresentEmbeddableTest.java @@ -229,7 +229,6 @@ public void setEmbeddableMapValueWithAnnotation( } @Embeddable - @MappedSuperclass public static class EmbeddableWithAnnotation { private String text; @@ -283,8 +282,29 @@ public void setEmbedded(EmbeddableWithAnnotation embedded) { } } + @MappedSuperclass + public static abstract class MappedSuperclassForEmbeddable { + private String text; + + protected MappedSuperclassForEmbeddable() { + // For Hibernate ORM only - it will change the property value through reflection + } + + public MappedSuperclassForEmbeddable(String text) { + this.text = text; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + } + @Embeddable - public static class ExtendedEmbeddableWithAnnotation extends EmbeddableWithAnnotation { + public static class ExtendedEmbeddableWithAnnotation extends MappedSuperclassForEmbeddable { private Integer integer; protected ExtendedEmbeddableWithAnnotation() {