Aloha hey!
I already use JPA annotations, now I'd like to use JSR-303 annotations to validate attributes as well.
My questions is, how well do they interact with each other?
If I use @Basic(optional=false)
or @NotNull
, will I still have to use nullable=false
etc.?
I haven't decided which validator implementation to use, e.g. hibernate-validator or oVal (You may also suggest others. I know that oVal is not a JSR-303 implementation, but it maps most annotations).
oVal manual (see above) states that certain JPA annotations will be translated into oVal annotations as well. Hibernate-validator has a similar mechanism.
Some search results claim that Bean Validation and JPA do officially overlap, but I have not figured in which exact way.