Markus Schmider wrote:The AdressValidator.isValid method is never being called. What's wrong???
Your code example seems very similar with
this article. The only difference is that the article uses a custom constraint validator on an entity and yours example uses an embeddable. Could you try adding
the @Valid annotation where you are using your custom
@ValidAdress annotation. That might trigger your validation provider to validate the adress which will then call your
@ValidAdress validator. So the code would look like
Another (unrelated) note: why are you not using the
FIND_ALL constant when defining the named query?
Hope it helps!
Kind regards,
Roel