We create our tables automaticly via Hibernate by assigning:
@Table(name = "some_table")
That used to work for "normal" entities. But when we have an abstract base class:
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class PersonBankAccount extends AbstractPersistable<Long> {
that is extended by
@Entity
@Table(name = "person_bank_account")
public class PersonBankAccountSimple extends PersonBankAccount {
The resulting table in the database is named
personbankaccount
What is going on here?
The autogenerator says:
table not found: PersonBankAccount
when first creating it and on rerun he says:
table found: personbankaccount
Like I said, for normal tables everything works fine.
Shouldn't be the name of table in the base class instead.
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@Table(name = "person_bank_account")
public class PersonBankAccount extends AbstractPersistable<Long> {
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With