| JPA 2.2 specification says in section 11.1.24 Inheritance Annotation: "The Inheritance annotation defines the inheritance strategy to be used for an entity class hierarchy. It is specified on the entity class that is the root of the entity class hierarchy" Section 2.11.2 Mapped Superclasses says: "An entity may inherit from a superclass that provides persistent entity state and mapping information, but which is not itself an entity. Typically, the purpose of such a mapped superclass is to define state and mapping information that is common to multiple entity classes." The specification is clear that a mapped superclass is not an entity class. This is why Hibernate throws an exception. |