Hibernate Validator - @Column (nullable = false) - How to check annotations for persistence?

I use the Hibernate validator to authenticate an object in my web application. Hibernate tools generate entity objects from a database schema with @Column annotation containing "nullable = false".

... @Column(name = "LANG_IDENTIFIER", nullable = false, length = 2) public String getIdentifier() { return this.identifier; } ... 

Is it possible to use validate @Column as a null value? Adding "@NotNull" does the job, but that’s not what I want, because then I need to change all my generated classes.

Any entry is welcome!

+4
source share

Source: https://habr.com/ru/post/1494236/


All Articles