From ccadc9a406c702278b87753926c64b3bd5868a3c Mon Sep 17 00:00:00 2001 From: Emmanuel Bernard Date: Wed, 21 Apr 2010 13:26:17 +0000 Subject: [PATCH] HHH-4968 do not activate Bean Validation listeners when only DDL is requested. git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@19266 1b8cb986-b30d-0410-93ca-fae66ebed9b2 --- .../hibernate/cfg/beanvalidation/BeanValidationActivator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/annotations/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationActivator.java b/annotations/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationActivator.java index bcc08753e2..bbd2d142b5 100644 --- a/annotations/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationActivator.java +++ b/annotations/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationActivator.java @@ -50,7 +50,7 @@ public class BeanValidationActivator { properties.setProperty( Environment.CHECK_NULLABILITY, "false" ); } - if ( modes.contains( ValidationMode.NONE ) ) return; + if ( ! ( modes.contains( ValidationMode.CALLBACK ) || modes.contains( ValidationMode.AUTO ) ) ) return; try { Class activator = ReflectHelper.classForName( TYPE_SAFE_ACTIVATOR_CLASS, BeanValidationActivator.class );