Hi,
In my company we have a big problem with the @Valid annotation because it does not support groups to indicate when to propagate validation or not. We implement SOA Web Services with cannonical model, and many times the same entity appears twice in the same object graph with diferent behaviors, and some cases this entity must propagate validation and some cases not.
Example:
Code:
class PhoneMessage {
@Valid(group=Group1.class)
private Phone originPhone;
@Valid(group=Group2.class)
private Phone destinationPhone;
}
Anyone knows a elegant way to solve this with BV 1.0 ? The Beans Validation 1.1 will address this issue ?
Thanks,
Gilberto Holms