NetBeans let me choose between three values for the JPA validation strategy: Auto, Callback and None. What does "Auto" mean? Does "Callback" mean the use of @PrePersist, @PreUpdate, and @PreRemove?
Is there a performance hit if I use Auto or Callback if there is no validation to perform?
The JPA 2.0 Spec (JSR 317) does not require a Bean Validation (JSR-303) implementation. Validation is optional. Thus, javax.persistence.ValidationMode
can take different values:
Auto
(default) - if a validation provider is available, then validation should occurCallback
- validation is required and a PersistenceException
must be thrown if a provider cannot be obtainedNone
- no validation should be attempted and the lack of a validation provider should not cause an exceptionThis should answer all your questions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With