I will try to answer, assuming that the changes made to your post are approved. In the code below, I ignore the field f2 from class A, i.e. superclass B, using AttributeOverride.
@Entity @AttributeOverride(name = "f2", column = @Column(name = "f2_col", insertable = false, updatable = false) public class B extends A{ }
If you want to read more about this later, see AttributeOverride .
AttributeOverride with insertable = false , updatable = false should help, but it also depends on your inheritance strategy. It just helps make the matching fields inherited from the superclass transient, so some other subclass can use it, but it will be ignored for that particular subclass.
source share