在 > someclass
中,有 > Someothers class
中,覆盖一个
@MappedSuperClass
public abstract class SomeClass {
@Column(name = "NAME", length = 255, unique = false, nullable = true)
@Pattern(regex = "([a-zA-Z0-9]+_)*([a-zA-Z0-9]+)")
private String name;
…
}
@AttributeOverride(name = "name", column = @Column(name = "NAME", length = 20, unique = false, nullable = false))
public class SomeOtherClass extends SomeClass {
….
}
或者,是否有其他办法为继承的班级定义新的pater
?