]
Gail Badner updated HHH-4968:
-----------------------------
Fix Version/s: 3.5.x
Cannot deactivate default BeanValidationListener independently of DDL
constraints generation (Vladimir Klyushnikov)
-------------------------------------------------------------------------------------------------------------------
Key: HHH-4968
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-4968
Project: Hibernate Core
Issue Type: Bug
Components: annotations
Affects Versions: 3.5.0-CR-2
Environment: Hibernate 3.5.0-CR-2, Hibernate Validator 4.0.2.GA
Reporter: Vladimir Klyushnikov
Assignee: Emmanuel Bernard
Priority: Minor
Fix For: 3.5.x, 3.6
Attachments: BeanValidationActivator.patch
Hi,
I need to configure my custom BeanValidationListener instance through Spring, but I
cannot deactivate default BeanValidationListener instance. It can be switched off only
with DDL constraint generation. When I provide *DDL* value for
*javax.persistence.validation.mode* it still activates default BeanValidationListener.
When I provide *NONE* value it switches off both BeanValidationListener and DDL
constraints. This is because of following code in *BeanValidationListener.java*:
{code}
public static void activateBeanValidation(EventListeners eventListeners, Properties
properties) {
...
if ( modes.contains( ValidationMode.NONE ) ) return;
...
}
{code}
It should be changed to following:
{code}
if (!(modes.contains(ValidationMode.CALLBACK) || modes.contains(
ValidationMode.AUTO))) return;
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: