I have an abtract class like below:
@MappedSuperclass
public abstract class BaseEntity {
@Id
Long id;
String name;
//getters and setters
}
and two entity extend BaseEntity
Fist class
@Entity
@Table(name= "table1")
public class TValideB extends BaseEntity {
@Column(name = "phone")
String phone;
}
Second class
@Entity
@Table(name= "table2")
public class TValide extends BaseEntity {
@Colmun(name = "mail")
String mail;
}
When i try to save TValide i get error like this non valid column "name";
In my table2 non column exsit for name.
My question is how can i ignore this column and save my entity?
Exist an other approaches without delete column name from abstract
class?