I\'m currently stuck with what seems to be a very simple problem, but I just can\'t seem to find a way around:
I have 2 identical tables:
Using @MappedSuperclass, you would proceed as follows:
@MappedSuperclass
public class Transaction ...
@Entity
@Table(name="tbl_creditcard_approved_txns")
public class DeclinedTransaction extends Transaction ...
@Entity
@Table(name="tbl_creditcard_declined_txns")
public class ApprovedTransaction extends Transaction ...
Use @AttributeOverride to override column names between the two types of Transaction objects, if needed.
Update: I see that you want to map one @Entity to two tables in the same EntityManagerFactory ... I don't think you can do that.