[hibernate-issues] [Hibernate-JIRA] Created: (HV-324) Default annotation not executing when group selector activated

Marc Schipperheyn (JIRA) noreply at atlassian.com
Tue May 18 05:10:12 EDT 2010


Default annotation not executing when group selector activated
--------------------------------------------------------------

                 Key: HV-324
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-324
             Project: Hibernate Validator
          Issue Type: Bug
          Components: engine
    Affects Versions: 4.1.0.Beta1
            Reporter: Marc Schipperheyn
            Assignee: Hardy Ferentschik
         Attachments: RegistrationVO.java

When you call the validate function with a non-default group selector active, the default constraints do not execute. AFAIC this is unexpected behaviour. Default constraints by their very nature should always execute. Also, since it's very easy to exclude default execution by applying a non-default group selector.

If this is in fact a design decision then the documentation should make very, *very* clear (e.g. through one of those "Notes": Default constraints do NOT execute when a group selector is active! If you want the default to be executed, also add Default.class to the set of group selectors you specify) that default constraints do not execute when a group constraint is active. It doesn't at the moment and I was caught by surprise. 

-- 
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