@Range based hibernate validation checks
I would like to perform @Range based hibernate validation checks (org.hibernate.validator.RangeValidator) in my JPA entity code. But it seems to modify the generated SQL with this checks which I would like to avoid. (i.e In the range check, I have the current year as the @Range max value which is bound to change every year).
Hence, I had to remove this annotation from my JPA entity class. How would I be able to perform similar checks without adding the annotation? Should I do these checks in prePersist or preUpdate if so, how do I invoke the v开发者_JAVA百科alidators.
Appreciate any inputs on this topic
Section 2.1 on the reference guide talks about how to disable ddl generation using the following flag, set hibernate.validator.apply_to_ddl to false. I am using this flag to avoid ddl modification. Hence, I am closing this issue
精彩评论