Hibernate version: 3.2.4.sp1
I have a simple entity hierarchy:
Code:
abstract class Entity {
...
}
abstract class NamedEntity extends Entity {
protected String name;
@Column(name = "name")
@NotEmpty @Length(max=32)
public String getName() {
return name;
}
}
class ANamedEntityImpl extends NamedEntity {
@Override
@Length(max=50)
public String getName() {
return name;
}
}
I want to effectively override the @Length annotation for the name property in ANamedEntityImpl. What is the desired way to do this? Do I have to override the method in order to put an overriding @Length annotation as is the case in the code block above?
Thanks!