<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 21, 2013 at 9:17 AM, Hardy Ferentschik <span dir="ltr"><<a href="mailto:hardy@hibernate.org" target="_blank">hardy@hibernate.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">On 21 Jan 2013, at 3:36 PM, Gunnar Morling <<a href="mailto:gunnar@hibernate.org">gunnar@hibernate.org</a>> wrote:<br>
<br>
> I'm wondering whether it's legal that one constraint gets validated more than once during one validation operation. The spec seems a bit contradictory in this regard.<br>
><br>
> In section 4.6 "Validation routine" [1] it says:<br>
><br>
> "[...] this implies that a given validation constraint will not be processed more than once per validation."<br>
><br>
> Section 4.6.1 "Object graph validation" says though:<br>
><br>
> "[...] object graph navigation can lead to multiple validations of the same constraint and the same object instance but the set of constraint validation is deterministic and the algorithm prevents infinite loops."<br>
><br>
> What is right here? Or is this to say that *only* during graph validation a constraint may be validated multiple times but not e.g. during validation of multiple groups, all of which a constraint is part of?<br>
<br>
</div>If you are just validating a single bean every constraint can only be validated once. However, when you are dealing with object graphs a constraint can be validated once per path on which you reach it.<br>
So both sentences make sense in their context, but taken together there seems to be a contradiction. Maybe the first statement could just be removed?<br>
<br></blockquote><div> </div><div>My read of these sections yields an understanding that, during any
validation call, the same validated object/constraint pair must be
evaluated only once. I seem to be in agreement with Hardy here.<br><br>Matt<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
--Hardy<br>
<br>
<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>
</blockquote></div><br></div></div>