<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I like your first option too. Can you also add an issue at the spec level? Ideally do a pull request.&nbsp;<br><br>On 9 nov. 2012, at 19:01, Gunnar Morling &lt;<a href="mailto:gunnar@hibernate.org">gunnar@hibernate.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><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>&nbsp;&nbsp;&nbsp; @Valid<br>
&nbsp;&nbsp;&nbsp; @ConvertGroup(from=Default.class, to=AnotherGroup.class)<br>
&nbsp;&nbsp;&nbsp; Bar getBar() { ... }<br>
}</p>
<p>public class Baz extends Foo {</p>
<p>&nbsp;&nbsp;&nbsp; @Override<br>
&nbsp;&nbsp;&nbsp; @Valid<br>
&nbsp;&nbsp;&nbsp; @ConvertGroup(from=SomeGroup.class, to=YetAnotherGroup.class)<br>
&nbsp;&nbsp;&nbsp; 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>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>beanvalidation-dev mailing list</span><br><span><a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a></span><br><span><a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a></span><br></div></blockquote></body></html>