| Moritz Becker From the information, you gave, I think you're just missing a @Valid annotation on the address element. If you don't have one, the validation is not cascaded.
public abstract class AbstractCompanyRepresentation<T extends UpdateAddressRepresentation> {
@Valid
private T address;
public T getAddress() {
return address;
}
public void setAddress(T address) {
this.address = address;
}
}
With this annotation added, it works as expected. Let me know if it fixes your real use case. |