I am using Hibernate validator for entity validation in my web-app. Hibernate tools generates the entity objects from the database schema with @Column annotation, containing 'nullable = false'.
...
@Column(name = "LANG_IDENTIFIER", nullable = false, length = 2)
public String getIdentifier() {
return this.identifier;
}
...
Is there a way to use the validate @Column on being null? Adding '@NotNull' does the job, but this is not what I want, because then I need to change all my generated classes.
Any input would be greatly appreciated!