<p>Hi all,</p>
<p>I'm about to implement group conversion via @ConvertGroup in the RI.</p>
<p>I'm wondering how we should deal with situations where @ConvertGroup is given for a one property of a base class and again on a sub-class (same for interface and impl):</p>
<p>public class Foo {</p>
<p> @Valid<br>
@ConvertGroup(from=Default.class, to=AnotherGroup.class)<br>
Bar getBar() { ... }<br>
}</p>
<p>public class Baz extends Foo {</p>
<p> @Override<br>
@Valid<br>
@ConvertGroup(from=SomeGroup.class, to=YetAnotherGroup.class)<br>
Bar getBar() { ... }<br>
}</p>
<p>AFAICS we've got the following options here (in descending order of my preference):</p>
<p>* Merge all the conversions for a property from the hierarchy (so behavior is the same as when all conversions would have been given in one place using @ConvertGroup.List)<br>
* Consider only the top/bottom most conversion rule from the inheritance hierarchy<br>
* Allow only one conversion for a property in the hierarchy, throw an exception if multiple conversions are given</p>
<p>Any thoughts?</p>
<p>--Gunnar</p>