[hibernate-issues] [Hibernate-JIRA] Resolved: (BVAL-245) Define how method constraints are declared at parameters and return values

Emmanuel Bernard (JIRA) noreply at atlassian.com
Tue Mar 13 06:25:52 EDT 2012


     [ https://hibernate.onjira.com/browse/BVAL-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard resolved BVAL-245.
-----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.1)
                   1.1 early draft 1

> Define how method constraints are declared at parameters and return values
> --------------------------------------------------------------------------
>
>                 Key: BVAL-245
>                 URL: https://hibernate.onjira.com/browse/BVAL-245
>             Project: Bean Validation
>          Issue Type: Sub-task
>          Components: spec-general
>            Reporter: Gunnar Morling
>             Fix For: 1.1 early draft 1
>
>
> Emmanuel:
> {quote}
> Constraints on parameters whose type is a subtype of the accepted types by the constraint are declared directly on the parameter
>    void doHarm(@NotEmpty String kittenName);
> Constrains on parameters whose type is a constrained bean needs an annotation accepting the targeted groups. It was proposed to use @Valid for such case but [recent discussions|https://hibernate.onjira.com/browse/BVAL-208?focusedCommentId=43533#comment-43533] brought that back on the drawing board.
> There are a few notions floating around @Valid
> 1. cascade validation to nested beans
> 2. translate the validation of group A from the owning bean to validation of the group B on the nested bean (see BVAL-208)
> 3. define the group to validate in a method level validation
> About 3., I wonder if this should be part of Bean Validation or be part of the interception framework. In other words:
> * should it be an annotation provided / proposed by Bean Validation and recognized by interception techs like CDI, @Inject, Spring, AspectJ etc
> * should each interception tech provide its own annotation to specify the targeted group(s)
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list