I have this Entity
, that is a super class:
@Entity
public class Father implements Serializable{
@Column(name = "name")
@Size(min=1, max=10)
@Pattern(regexp="^[A-Za-z ]*$")
@NotNull
private String name;
}
this one, extends the one above:
@Entity
public class FatherSub extends Father implements Serializable{
private String name;
}
As you can see, in FatherSub
I don't have @Annotations
and I don't want them.
How can I override them? Is there a way?
It seems that the annotations @NotNull
persist in the subclass and ask me to fill
Father.name
(not FatherSub.name
) as you can see in these 2 Eclipse printscreen pics.
Thank you