[bv-dev] OverridesAttribute questions

Gunnar Morling gunnar at hibernate.org
Tue Jun 6 09:06:57 EDT 2017

Hi Matt,

2017-06-04 0:28 GMT+02:00 Matt Benson <mbenson at apache.org>:
> I have a couple of questions about @OverridesAttribute:
> 1. The spec says that #name() defaults to the name of the annotated
> attribute, but there is actually no default value declared. Should(n't) we
> declare as ""?

Great catch. I've filed
https://hibernate.atlassian.net/browse/BVAL-634, PR for API and spec
coming up in a bit.

> 2. I don't have a clear understanding from the spec what the expectations
> are if there is a single override specified using the default
> constraintIndex value, but with multiple composing constraints of the
> specified type. Does the override apply to all? Is it an error?

It's my expectation that an error would be raised. I would say it
falls into the category of

    "If the composition is invalid, e.g. [...] a single attribute
mapped to more than one source attribute [...] a
ConstraintDefinitionException is raised"

Let me know if you think that's too vague and we should add this case
more explicitly to the list of erroneous overrides discussed in the

> Matt


> _______________________________________________
> beanvalidation-dev mailing list
> beanvalidation-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/beanvalidation-dev

More information about the beanvalidation-dev mailing list