JPA implementation by default check validation constrains at the following lifecycle points:
javax.persistence.validation.group.pre-persist
javax.persistence.validation.group.pre-update
javax.persistence.validation.group.pre-remove
In a spring boot application what's the way to customize this behaviour ?
I don't want to use a persistence.xml
file
Also, is there a way to enable the check also when an Entity is loaded ?
Like if I'm using @NotNull
I also want to declare that any instance of that entity,
with that property null is just invalid, so an exception should be thrown ?