From 062afdb6cda9fe359740b0ed4aad2a1a3b83fc15 Mon Sep 17 00:00:00 2001 From: Marco Belladelli Date: Thu, 23 May 2024 11:46:59 +0200 Subject: [PATCH] HHH-18103 Correct metamodel for embeddables with a mapped superclass --- .../model/internal/ClassPropertyHolder.java | 12 +- .../internal/ComponentPropertyHolder.java | 15 ++- .../boot/model/internal/EmbeddableBinder.java | 32 ++--- .../boot/model/internal/InheritanceState.java | 31 ++++- .../model/internal/PropertyHolderBuilder.java | 5 +- .../java/org/hibernate/mapping/Component.java | 9 ++ .../metamodel/internal/AttributeFactory.java | 113 +++++++++++++----- .../metamodel/internal/MetadataContext.java | 13 +- ...ditedEmbeddableWithNoDeclaredDataTest.java | 3 +- 9 files changed, 169 insertions(+), 64 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/ClassPropertyHolder.java b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/ClassPropertyHolder.java index 81ef96acd1..995d43a6e7 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/ClassPropertyHolder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/ClassPropertyHolder.java @@ -287,7 +287,7 @@ public class ClassPropertyHolder extends AbstractPropertyHolder { } if ( inheritanceState.isEmbeddableSuperclass() ) { persistentClass.addMappedSuperclassProperty( property ); - addPropertyToMappedSuperclass( property, declaringClass ); + addPropertyToMappedSuperclass( property, declaringClass, getContext() ); } else { persistentClass.addProperty( property ); @@ -298,10 +298,10 @@ public class ClassPropertyHolder extends AbstractPropertyHolder { } } - private void addPropertyToMappedSuperclass(Property prop, XClass declaringClass) { - final Class type = getContext().getBootstrapContext().getReflectionManager().toClass( declaringClass ); - final MappedSuperclass superclass = getContext().getMetadataCollector().getMappedSuperclass( type ); - prepareActualProperty( prop, type, true, getContext(), superclass::addDeclaredProperty ); + static void addPropertyToMappedSuperclass(Property prop, XClass declaringClass, MetadataBuildingContext context) { + final Class type = context.getBootstrapContext().getReflectionManager().toClass( declaringClass ); + final MappedSuperclass superclass = context.getMetadataCollector().getMappedSuperclass( type ); + prepareActualProperty( prop, type, true, context, superclass::addDeclaredProperty ); } static void prepareActualProperty( @@ -458,7 +458,7 @@ public class ClassPropertyHolder extends AbstractPropertyHolder { } if ( inheritanceState.isEmbeddableSuperclass() ) { join.addMappedSuperclassProperty( property ); - addPropertyToMappedSuperclass( property, declaringClass ); + addPropertyToMappedSuperclass( property, declaringClass, getContext() ); } else { join.addProperty( property ); diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/ComponentPropertyHolder.java b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/ComponentPropertyHolder.java index d557343243..a9ae721179 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/ComponentPropertyHolder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/ComponentPropertyHolder.java @@ -30,7 +30,10 @@ import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.JoinTable; +import static org.hibernate.boot.model.internal.ClassPropertyHolder.addPropertyToMappedSuperclass; +import static org.hibernate.boot.model.internal.ClassPropertyHolder.handleGenericComponentProperty; import static org.hibernate.boot.model.internal.HCANNHelper.hasAnnotation; +import static org.hibernate.internal.util.NullnessUtil.castNonNull; import static org.hibernate.internal.util.StringHelper.isEmpty; import static org.hibernate.internal.util.StringHelper.qualifyConditionally; import static org.hibernate.spi.NavigablePath.IDENTIFIER_MAPPER_PROPERTY; @@ -67,6 +70,7 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder { private final Component component; private final boolean isOrWithinEmbeddedId; private final boolean isWithinElementCollection; + private final Map inheritanceStatePerClass; private final String embeddedAttributeName; private final Map attributeConversionInfoMap; @@ -76,7 +80,8 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder { String path, PropertyData inferredData, PropertyHolder parent, - MetadataBuildingContext context) { + MetadataBuildingContext context, + Map inheritanceStatePerClass) { super( path, parent, inferredData.getPropertyClass(), context ); final XProperty embeddedXProperty = inferredData.getProperty(); setCurrentProperty( embeddedXProperty ); @@ -85,6 +90,7 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder { || hasAnnotation( embeddedXProperty, Id.class, EmbeddedId.class ); this.isWithinElementCollection = parent.isWithinElementCollection() || parent instanceof CollectionPropertyHolder; + this.inheritanceStatePerClass = inheritanceStatePerClass; if ( embeddedXProperty != null ) { this.embeddedAttributeName = embeddedXProperty.getName(); @@ -314,6 +320,13 @@ public class ComponentPropertyHolder extends AbstractPropertyHolder { @Override public void addProperty(Property prop, XClass declaringClass) { + handleGenericComponentProperty( prop, getContext() ); + if ( declaringClass != null ) { + final InheritanceState inheritanceState = inheritanceStatePerClass.get( declaringClass ); + if ( inheritanceState != null && inheritanceState.isEmbeddableSuperclass() ) { + addPropertyToMappedSuperclass( prop, declaringClass, getContext() ); + } + } component.addProperty( prop, declaringClass ); } diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/EmbeddableBinder.java b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/EmbeddableBinder.java index c2cdb9f39d..92243de333 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/EmbeddableBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/EmbeddableBinder.java @@ -353,7 +353,8 @@ public class EmbeddableBinder { subpath, inferredData, propertyHolder, - context + context, + inheritanceStatePerClass ); // propertyHolder here is the owner of the component property. @@ -381,18 +382,23 @@ public class EmbeddableBinder { context ); - bindDiscriminator( - component, - returnedClassOrElement, - propertyHolder, - subholder, - inferredData, - inheritanceStatePerClass, - context - ); + final InheritanceState inheritanceState = inheritanceStatePerClass.get( returnedClassOrElement ); + if ( inheritanceState != null ) { + inheritanceState.postProcess( component ); + // Main entry point for binding embeddable inheritance + bindDiscriminator( + component, + returnedClassOrElement, + propertyHolder, + subholder, + inferredData, + inheritanceState, + context + ); + } - final Map subclassToSuperclass = component.isPolymorphic() ? new HashMap<>() : null; final XClass annotatedClass = inferredData.getPropertyClass(); + final Map subclassToSuperclass = component.isPolymorphic() ? new HashMap<>() : null; final List classElements = collectClassElements( propertyAccessor, context, @@ -487,13 +493,11 @@ public class EmbeddableBinder { PropertyHolder parentHolder, PropertyHolder holder, PropertyData propertyData, - Map inheritanceStatePerClass, + InheritanceState inheritanceState, MetadataBuildingContext context) { - final InheritanceState inheritanceState = inheritanceStatePerClass.get( componentClass ); if ( inheritanceState == null ) { return; } - final AnnotatedDiscriminatorColumn discriminatorColumn = processEmbeddableDiscriminatorProperties( componentClass, propertyData, diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/InheritanceState.java b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/InheritanceState.java index ce329682a6..16156c606d 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/InheritanceState.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/InheritanceState.java @@ -17,7 +17,9 @@ import org.hibernate.annotations.common.reflection.XProperty; import org.hibernate.boot.spi.AccessType; import org.hibernate.boot.spi.MetadataBuildingContext; import org.hibernate.boot.spi.PropertyData; +import org.hibernate.mapping.Component; import org.hibernate.mapping.PersistentClass; +import org.hibernate.mapping.Table; import jakarta.persistence.Access; import jakarta.persistence.EmbeddedId; @@ -163,6 +165,15 @@ public class InheritanceState { return elementsToProcess; } + public void postProcess(Component component) { + if ( classesToProcessForMappedSuperclass.isEmpty() ) { + // Component classes might be processed more than once, + // so only do this the first time we encounter them + getMappedSuperclassesTillNextEntityOrdered(); + } + addMappedSuperClassInMetadata( component ); + } + public XClass getClassWithIdClass(boolean evenIfSubclass) { if ( !evenIfSubclass && hasParents() ) { return null; @@ -300,7 +311,21 @@ public class InheritanceState { while ( superclassState != null && superclassState.isEmbeddableSuperclass() ); } + private void addMappedSuperClassInMetadata(Component component) { + org.hibernate.mapping.MappedSuperclass mappedSuperclass = processMappedSuperclass( component.getTable() ); + if ( mappedSuperclass != null ) { + component.setMappedSuperclass( mappedSuperclass ); + } + } + private void addMappedSuperClassInMetadata(PersistentClass persistentClass) { + org.hibernate.mapping.MappedSuperclass mappedSuperclass = processMappedSuperclass( persistentClass.getImplicitTable() ); + if ( mappedSuperclass != null ) { + persistentClass.setSuperMappedSuperclass( mappedSuperclass ); + } + } + + private org.hibernate.mapping.MappedSuperclass processMappedSuperclass(Table implicitTable) { //add @MappedSuperclass in the metadata // classes from 0 to n-1 are @MappedSuperclass and should be linked final InheritanceState superEntityState = getInheritanceStateOfSuperEntity( clazz, inheritanceStatePerClass ); @@ -317,14 +342,12 @@ public class InheritanceState { //add MappedSuperclass if not already there mappedSuperclass = buildingContext.getMetadataCollector().getMappedSuperclass( type ); if ( mappedSuperclass == null ) { - mappedSuperclass = new org.hibernate.mapping.MappedSuperclass( parentSuperclass, superEntity, persistentClass.getImplicitTable() ); + mappedSuperclass = new org.hibernate.mapping.MappedSuperclass( parentSuperclass, superEntity, implicitTable ); mappedSuperclass.setMappedClass( type ); buildingContext.getMetadataCollector().addMappedSuperclass( type, mappedSuperclass ); } } - if ( mappedSuperclass != null ) { - persistentClass.setSuperMappedSuperclass( mappedSuperclass ); - } + return mappedSuperclass; } public static final class ElementsToProcess { diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/PropertyHolderBuilder.java b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/PropertyHolderBuilder.java index 2bf86e7ff7..ee45564cc2 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/internal/PropertyHolderBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/internal/PropertyHolderBuilder.java @@ -54,8 +54,9 @@ public final class PropertyHolderBuilder { String path, PropertyData inferredData, PropertyHolder parent, - MetadataBuildingContext context) { - return new ComponentPropertyHolder( component, path, inferredData, parent, context ); + MetadataBuildingContext context, + Map inheritanceStatePerClass) { + return new ComponentPropertyHolder( component, path, inferredData, parent, context, inheritanceStatePerClass ); } /** diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Component.java b/hibernate-core/src/main/java/org/hibernate/mapping/Component.java index 5d90892327..431099e0ca 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Component.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Component.java @@ -86,6 +86,7 @@ public class Component extends SimpleValue implements MetaAttributable, Sortable private boolean isKey; private Boolean isGeneric; private String roleName; + private MappedSuperclass mappedSuperclass; private Value discriminator; private transient DiscriminatorType discriminatorType; private Map discriminatorValues; @@ -601,6 +602,14 @@ public class Component extends SimpleValue implements MetaAttributable, Sortable this.roleName = roleName; } + public MappedSuperclass getMappedSuperclass() { + return mappedSuperclass; + } + + public void setMappedSuperclass(MappedSuperclass mappedSuperclass) { + this.mappedSuperclass = mappedSuperclass; + } + public Value getDiscriminator() { return discriminator; } diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java index 87023fb70d..351500a463 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java @@ -24,6 +24,7 @@ import org.hibernate.mapping.Collection; import org.hibernate.mapping.Component; import org.hibernate.mapping.List; import org.hibernate.mapping.Map; +import org.hibernate.mapping.MappedSuperclass; import org.hibernate.mapping.OneToMany; import org.hibernate.mapping.PersistentClass; import org.hibernate.mapping.Property; @@ -44,6 +45,7 @@ import org.hibernate.metamodel.model.domain.DomainType; import org.hibernate.metamodel.model.domain.EmbeddableDomainType; import org.hibernate.metamodel.model.domain.IdentifiableDomainType; import org.hibernate.metamodel.model.domain.ManagedDomainType; +import org.hibernate.metamodel.model.domain.MappedSuperclassDomainType; import org.hibernate.metamodel.model.domain.PersistentAttribute; import org.hibernate.metamodel.model.domain.SimpleDomainType; import org.hibernate.metamodel.model.domain.SingularPersistentAttribute; @@ -263,10 +265,20 @@ public class AttributeFactory { } } + final MappedSuperclass mappedSuperclass = component.getMappedSuperclass(); + final MappedSuperclassDomainType superType; + if ( mappedSuperclass != null ) { + //noinspection unchecked + superType = (MappedSuperclassDomainType) context.locateMappedSuperclassType( mappedSuperclass ); + } + else { + superType = null; + } + final DomainType discriminatorType = component.isPolymorphic() ? component.getDiscriminatorType() : null; final EmbeddableTypeImpl embeddableType = new EmbeddableTypeImpl<>( context.getJavaTypeRegistry().resolveManagedTypeDescriptor( embeddableClass ), - null, + superType, discriminatorType, false, context.getJpaMetamodel() @@ -409,7 +421,7 @@ public class AttributeFactory { else if ( persistenceType == Type.PersistenceType.MAPPED_SUPERCLASS ) { final PersistentClass persistentClass = metadataContext.getPersistentClassHostingProperties( (MappedSuperclassTypeImpl) ownerType ); - return metadataContext.getMetamodel().findEntityDescriptor( persistentClass.getClassName() ); + return persistentClass != null ? metadataContext.getMetamodel().findEntityDescriptor( persistentClass.getClassName() ) : null; } else { throw new AssertionFailure( "Cannot get the metamodel for PersistenceType: " + persistenceType ); @@ -646,6 +658,13 @@ public class AttributeFactory { private static final MemberResolver embeddedMemberResolver = (attributeContext, metadataContext) -> { // the owner is an embeddable final EmbeddableDomainType ownerType = (EmbeddableDomainType) attributeContext.getOwnerType(); + return resolveEmbeddedMember( attributeContext.getPropertyMapping(), ownerType, metadataContext ); + }; + + private static Member resolveEmbeddedMember( + Property property, + EmbeddableDomainType ownerType, + MetadataContext metadataContext) { final Component ownerBootDescriptor = metadataContext.getEmbeddableBootDescriptor( ownerType ); final CompositeTypeImplementor ownerComponentType = (CompositeTypeImplementor) ownerBootDescriptor.getType(); @@ -655,16 +674,15 @@ public class AttributeFactory { ownerRepresentationStrategy( metadataContext, ownerMappingModelDescriptor, ownerBootDescriptor ); if ( ownerRepStrategy.getMode() == RepresentationMode.MAP ) { - final Property propertyMapping = attributeContext.getPropertyMapping(); - return new MapMember( propertyMapping.getName(), propertyMapping.getType().getReturnedClass() ); + return new MapMember( property.getName(), property.getType().getReturnedClass() ); } else { return ownerRepStrategy - .resolvePropertyAccess( attributeContext.getPropertyMapping() ) + .resolvePropertyAccess( property ) .getGetter() .getMember(); } - }; + } private static EmbeddableRepresentationStrategy ownerRepresentationStrategy( MetadataContext metadataContext, EmbeddableValuedModelPart ownerMappingModelDescriptor, Component ownerBootDescriptor) { @@ -688,7 +706,11 @@ public class AttributeFactory { private static final MemberResolver virtualIdentifierMemberResolver = (attributeContext, metadataContext) -> { final AbstractIdentifiableType identifiableType = (AbstractIdentifiableType) attributeContext.getOwnerType(); - final EntityPersister entityPersister = getDeclarerEntityPersister( identifiableType, metadataContext ); + final EntityPersister declaringEntity = getDeclaringEntity( identifiableType, metadataContext ); + return resolveVirtualIdentifierMember( attributeContext.getPropertyMapping(), declaringEntity ); + }; + + private static Member resolveVirtualIdentifierMember( Property property, EntityPersister entityPersister) { final EntityIdentifierMapping identifierMapping = entityPersister.getIdentifierMapping(); if ( identifierMapping.getNature() != EntityIdentifierMapping.Nature.VIRTUAL ) { @@ -697,7 +719,7 @@ public class AttributeFactory { final CompositeIdentifierMapping cid = (CompositeIdentifierMapping) identifierMapping; final EmbeddableMappingType embeddable = cid.getPartMappingType(); - final String attributeName = attributeContext.getPropertyMapping().getName(); + final String attributeName = property.getName(); final AttributeMapping attributeMapping = embeddable.findAttributeMapping( attributeName ); if ( attributeMapping == null ) { throw new PropertyNotFoundException( @@ -708,9 +730,9 @@ public class AttributeFactory { final Getter getter = attributeMapping.getPropertyAccess().getGetter(); return getter instanceof PropertyAccessMapImpl.GetterImpl - ? new MapMember( attributeName, attributeContext.getPropertyMapping().getType().getReturnedClass() ) + ? new MapMember( attributeName, property.getType().getReturnedClass() ) : getter.getMember(); - }; + } /** * A {@link Member} resolver for normal attributes. @@ -722,29 +744,66 @@ public class AttributeFactory { if ( Type.PersistenceType.EMBEDDABLE == persistenceType ) { return embeddedMemberResolver.resolveMember( attributeContext, metadataContext ); } - else if ( Type.PersistenceType.ENTITY == persistenceType - || Type.PersistenceType.MAPPED_SUPERCLASS == persistenceType ) { - final AbstractIdentifiableType identifiableType = (AbstractIdentifiableType) ownerType; - final EntityPersister declaringEntityPersister = getDeclaringEntity( identifiableType, metadataContext ); - final String propertyName = property.getName(); - - final AttributeMapping attributeMapping = declaringEntityPersister.findAttributeMapping( propertyName ); - if ( attributeMapping == null ) { - // just like in #determineIdentifierJavaMember , this *should* indicate we have an IdClass mapping - return virtualIdentifierMemberResolver.resolveMember( attributeContext, metadataContext ); - } - else { - final Getter getter = getter( declaringEntityPersister, property ); - return getter instanceof PropertyAccessMapImpl.GetterImpl - ? new MapMember( propertyName, property.getType().getReturnedClass() ) - : getter.getMember(); - } + else if ( Type.PersistenceType.MAPPED_SUPERCLASS == persistenceType ) { + return resolveMappedSuperclassMember( + property, + (MappedSuperclassDomainType) ownerType, + metadataContext + ); + } + else if ( Type.PersistenceType.ENTITY == persistenceType ) { + return resolveEntityMember( property, getDeclaringEntity( (AbstractIdentifiableType) ownerType, metadataContext ) ); } else { throw new IllegalArgumentException( "Unexpected owner type : " + persistenceType ); } }; + private static Member resolveEntityMember(Property property, EntityPersister declaringEntity) { + final String propertyName = property.getName(); + final AttributeMapping attributeMapping = declaringEntity.findAttributeMapping( propertyName ); + if ( attributeMapping == null ) { + // just like in #determineIdentifierJavaMember , this *should* indicate we have an IdClass mapping + return resolveVirtualIdentifierMember( property, declaringEntity ); + } + else { + final Getter getter = getter( declaringEntity, property ); + return getter instanceof PropertyAccessMapImpl.GetterImpl + ? new MapMember( propertyName, property.getType().getReturnedClass() ) + : getter.getMember(); + } + } + + private static Member resolveMappedSuperclassMember( + Property property, + MappedSuperclassDomainType ownerType, + MetadataContext metadataContext) { + final EntityPersister declaringEntity = getDeclaringEntity( (AbstractIdentifiableType) ownerType, metadataContext ); + if ( declaringEntity != null ) { + return resolveEntityMember( property, declaringEntity ); + } + else { + final ManagedDomainType subType = ownerType.getSubTypes().iterator().next(); + final Type.PersistenceType persistenceType = subType.getPersistenceType(); + if ( persistenceType == Type.PersistenceType.ENTITY ) { + return resolveEntityMember( property, getDeclaringEntity( (AbstractIdentifiableType) subType, metadataContext ) ); + } + else if ( persistenceType == Type.PersistenceType.EMBEDDABLE ) { + return resolveEmbeddedMember( property, (EmbeddableDomainType) subType, metadataContext ); + } + else if ( persistenceType == Type.PersistenceType.MAPPED_SUPERCLASS ) { + return resolveMappedSuperclassMember( + property, + (MappedSuperclassDomainType) subType, + metadataContext + ); + } + else { + throw new IllegalArgumentException( "Unexpected sub-type: " + persistenceType ); + } + } + } + private final MemberResolver identifierMemberResolver = (attributeContext, metadataContext) -> { final AbstractIdentifiableType identifiableType = (AbstractIdentifiableType) attributeContext.getOwnerType(); diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java index f8f04a2429..864af9d455 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java @@ -211,7 +211,9 @@ public class MetadataContext { identifiableTypesByName.put( mappedSuperclassType.getTypeName(), mappedSuperclassType ); mappedSuperclassByMappedSuperclassMapping.put( mappedSuperclass, mappedSuperclassType ); orderedMappings.add( mappedSuperclass ); - mappedSuperClassTypeToPersistentClass.put( mappedSuperclassType, getEntityWorkedOn() ); + if ( !stackOfPersistentClassesBeingProcessed.isEmpty() ) { + mappedSuperClassTypeToPersistentClass.put( mappedSuperclassType, getEntityWorkedOn() ); + } knownMappedSuperclasses.remove( mappedSuperclass ); } @@ -804,14 +806,7 @@ public class MetadataContext { } public PersistentClass getPersistentClassHostingProperties(MappedSuperclassTypeImpl mappedSuperclassType) { - final PersistentClass persistentClass = mappedSuperClassTypeToPersistentClass.get( mappedSuperclassType ); - if ( persistentClass == null ) { - throw new AssertionFailure( - "Could not find PersistentClass for MappedSuperclassType: " - + mappedSuperclassType.getJavaType() - ); - } - return persistentClass; + return mappedSuperClassTypeToPersistentClass.get( mappedSuperclassType ); } public Set getUnusedMappedSuperclasses() { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/components/mappedsuperclass/AuditedEmbeddableWithNoDeclaredDataTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/components/mappedsuperclass/AuditedEmbeddableWithNoDeclaredDataTest.java index f2ef23e987..670d77a3cc 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/components/mappedsuperclass/AuditedEmbeddableWithNoDeclaredDataTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/components/mappedsuperclass/AuditedEmbeddableWithNoDeclaredDataTest.java @@ -32,7 +32,8 @@ public class AuditedEmbeddableWithNoDeclaredDataTest extends BaseEnversJPAFuncti return new Class[] { EntityWithAuditedEmbeddableWithNoDeclaredData.class, AbstractAuditedEmbeddable.class, - AuditedEmbeddableWithDeclaredData.class + AuditedEmbeddableWithDeclaredData.class, + AuditedEmbeddableWithNoDeclaredData.class, }; }