[hibernate-issues] [Hibernate-JIRA] Resolved: (HV-183) Composite constraints have to honour the payload parameter as well

Hardy Ferentschik (JIRA) noreply at atlassian.com
Wed Aug 26 08:12:15 EDT 2009


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

Hardy Ferentschik resolved HV-183.
----------------------------------

    Resolution: Fixed

> Composite constraints have to honour the payload parameter as well
> ------------------------------------------------------------------
>
>                 Key: HV-183
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-183
>             Project: Hibernate Validator
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 4.0.0.Beta1
>            Reporter: Hardy Ferentschik
>            Assignee: Hardy Ferentschik
>             Fix For: 4.0.0.CR1
>
>
> i tested the current payload impl.
> it works for simple constraints - e.g.:
>     @NotNull(payload = Severity.Warn.class)
> but it doesn't work for composite constraints - e.g.:
>     @NickName(payload = Severity.Warn.class)
> with the following workaround it works:
> @NotNull
> @Size
> //...
> public @interface NickName {
>     @OverridesAttribute.List({
>         @OverridesAttribute(constraint = NotNull.class, name = "payload"),
>         @OverridesAttribute(constraint = Size.class, name = "payload")        
>     })
>     Class<? extends ConstraintPayload>[] payload() default {};
>     //...
> }

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