[hibernate-issues] [Hibernate-JIRA] Reopened: (HHH-4968) Cannot deactivate default BeanValidationListener independently of DDL constraints generation (Vladimir Klyushnikov)

Gail Badner (JIRA) noreply at atlassian.com
Mon May 3 11:56:32 EDT 2010


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner reopened HHH-4968:
------------------------------


Emmanuel,

Please backport to Branch_3_5.

Thanks,
Gail

> 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.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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list