I want to validate a child Proxy (@Embeddable) on an EntityProxy with the new Validation frame work but i have a problem
The code looks some thing like this:
@ProxyFor(locator=BaseEntityLocator.class, value=Producto.class)
public interface ProductoProxy extends EntityProxy {
public void setInformacionAduanera(InformacionAduaneraProxy informacionAduanera);
@Valid
public InformacionAduaneraProxy getInformacionAduanera();
...
}
@ProxyFor(value=InformacionAduanera.class)
public interface InformacionAduaneraProxy extends ValueProxy {
@NotNull(message="notNull")
public Date getFecha();
}
On other part of the App
this.productoProxy = request.create(ProductoProxy.class);
informacionAduaneraProxy = request.create(InformacionAduaneraProxy.class);
this.productoProxy.setInformacionAduanera(informacionAduaneraProxy);
Then finally
RequestContext r = driver.flush();
Set contraints = Validation.buildDefaultValidatorFactory().getValidator().validate(productoProxy);
I expect the @Valid annotation on the Entity proxy cascade the @NotNull on my InformacionAduaneraProxy but it dosn't
happen.
The validator only returns the constraints for the EntityProxy
I have both classes on the :
@GwtValidation(value={ CredencialesUsuario.class, ProductoProxy.class, InformacionAduaneraProxy.class })
Why?
Thank you.