[hibernate-dev] ValidationMode

Emmanuel Bernard emmanuel at hibernate.org
Mon Mar 4 08:21:26 EST 2013


Our impl allow multiple choices to be able to add ddl as an additional
behavior as it (was) not defined in the spec.

And indeed, auto uses the degraded mode and callback forced BV to be
used and raise an exception if it is not present. I can see apps deciding
for one or the other.

Emmanuel

On Fri 2013-02-22 21:38, Hardy Ferentschik wrote:
> 
> On 22 Jan 2013, at 9:17 PM, Steve Ebersole <steve at hibernate.org> wrote:
> 
> > Kind of.  What I mean is that the HEM integration code is allowing Set <ValidationMode>.  So our impl allows a value like "auto, ddl" or other combos.  I am not able to grok why we allow multiples.
> 
> I think this is a Hibernate specific "feature" to support also ddl generation. The idea is to say something like "callback,ddl" to enable validation and application of DDL constraints.
> Emmanuel might know more. With JPA 2.1 and the DDL stuff part of the spec I would assume there are are other explicit options to enable/disable these features. 
> 
> > Also auto and callback are slightly different.  callback causes an error if no bv provider is available whereas auto then skips validation.
> 
> Hmm, seems wrong indeed, but maybe that's the difference in the end. Looking at "3.6.1.1 Enabling Automatic Validation" of the spec for the auto mode it is not explicitly mentioned 
> that an exception should be thrown whereas for callback it is. Whether this is international or just badly written I don't know. Maybe something to clarify in the spec.
> Don't we have someone in the JPA expert group ;-)
> 
> --Hardy
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev


More information about the hibernate-dev mailing list