This is a follow-up question based on Oliver Gierke's suggestion.
We have two tables (almost same information) but for some external reasons, cannot use a common single table. I am getting an error that the base class is not a mapped entity. Oliver Gierke has mentioned in his response that it would work only for Single Table. I am assuming that is the reason. if so, could someone explain why such limitation and how can I make the following work.
Base entity:
@MappedSuperclass
public abstract class DecisionEntity {
Inherited classes:
@Entity
@Table(name="DM_INSP_TASKING_RULES_RSLT")
public class DmInspTaskingRulesRslt extends DecisionEntity implements Serializable {
@Entity
@Table(name="DM_UW_REF_RULES_RSLT")
public class DmUwRefRulesRslt extends DecisionEntity implements Serializable {
The Repository
@Repository
public interface DecisionManagementRepository<T extends DecisionEntity> extends JpaRepository<DecisionEntity, Long> {
Have defined 'packagesToScan' and also listed all the 3 classes in persistence.xml. I am getting the 'Non an Managed Entity' for 'DecisionEntity' class. I tried Inheritence Type - 'TABLE_PER_CLASS