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?
Markus Schmider wrote:Adding the Valid Annotation has not solved the problem (although it seems logical to add it ...)
Honestly I expected that would do the trick, but it didn't. So I'm a bit clueless, so that means guessing and trial & error will be next
Which version of JPA/Hibernate are you using? I assume that regular bean validation does work (e.g. @Size(min=2, max=50)). It would be nice if you could create a small custom bean validation, apply it to the entity itself (instead of with an embeddable) and see if that works. If it does, we can assume it's embeddable related. If it doesn't, we can assume it's related to custom bean validation in general.