<div dir="ltr">But isn't this is the same with putting a real annotation to a getter? At least as long as we don't have something like @ValidateOnCall in BV (for which we then again would need a way for specifying in XML I guess).<div>
<br></div><div>Maybe it's a good idea to wait with the XML stuff for the getter work being finished.</div><div><br></div><div style>--Gunnar</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/1/18 Emmanuel Bernard <span dir="ltr"><<a href="mailto:emmanuel@hibernate.org" target="_blank">emmanuel@hibernate.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
What concerns me is that with this situation, the <method /> approach<br>
would lead to constraints being applied on the property when validating<br>
the bean.<br>
So either way, there is an awkward model.<br>
<div class="HOEnZb"><div class="h5"><br>
On Fri 2013-01-18 16:28, Gunnar Morling wrote:<br>
> 2013/1/18 Emmanuel Bernard <<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>><br>
><br>
> > Do you think it makes sense to force people to always use getter for<br>
> > getters? My only concern is that it might feel awkward for what I call<br>
> > action getters that people don't consider getters.<br>
> ><br>
><br>
> Hum, I don't think it makes sense to enforce this. The idea is that you can<br>
> chose to use either "getter":<br>
><br>
> <getter name="foo"><br>
> <valid/><br>
> <constraint annotation="javax.validation.constraints.NotNull"/><br>
> </getter><br>
><br>
> or "method" (e.g. for an "action getter"):<br>
><br>
> <method name="getFoo"><br>
> <return-value><br>
> <valid/><br>
> <constraint annotation="javax.validation.constraints.NotNull"/><br>
> </return-value><br>
> </method><br>
><br>
> as you like, but not both at the same time as they could conflict (similar<br>
> to that you must not have two "getter" elements with the same name).<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> beanvalidation-dev mailing list<br>
> <a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
<br>
_______________________________________________<br>
beanvalidation-dev mailing list<br>
<a href="mailto:beanvalidation-dev@lists.jboss.org">beanvalidation-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/beanvalidation-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/beanvalidation-dev</a><br>
</div></div></blockquote></div><br></div>