+1 For this feature, I have run up against this problem multiple times already.
The simplest usecase I can come up with is a wizard like flow building up a credit card payment details bean, which may have two addresses shipping and billing. Step one you want to validate the shipping address, step two you need to validate the billing address.
+1 For this feature, I have run up against this problem multiple times already.
The simplest usecase I can come up with is a wizard like flow building up a credit card payment details bean, which may have two addresses shipping and billing. Step one you want to validate the shipping address, step two you need to validate the billing address.
@Entity
public class PaymentDetails{
@Embeded
@Valid(groups={IContactForm.class})
Address address;
@Embedded
@Valid(groups={IBillingForm.class})
@AttributeOverrides({@AttributeOverride(name="address1", column=@Column(name="billing_address1")), ..., ...., })
Address billingAddress;
}