We're updating the issue view to help you get more done. 

Don't throw exception if both @MappedSuperclass and @Inheritance are used

Description

Trying to upgrade from 5.3.7 to 5.4 I've ran into a regression that seems to be caused by the change from HHH-12653.
I'm using the Log4j JPA appender and that triggers the exception:

1 2 3 4 5 6 7 8 9 10 11 org.hibernate.AnnotationException: An entity cannot be annotated with both @Inheritance and @MappedSuperclass: org.apache.logging.log4j.core.appender.db.jpa.AbstractLogEventWrapperEntity at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:539) at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:254) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:230) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:273) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:903) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:934) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:56) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)

Environment

Log4j 2.11.1

Status

Assignee

Vlad Mihalcea

Reporter

Andrei Ivanov

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.3.7

Components

Affects versions

5.4.1

Priority

Major