[hibernate-issues] [Hibernate-JIRA] Created: (HV-548) Validation annotation override in class inheritance

Alex Landini (JIRA) noreply at atlassian.com
Fri Dec 23 12:11:19 EST 2011


Validation annotation override in class inheritance
---------------------------------------------------

                 Key: HV-548
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-548
             Project: Hibernate Validator
          Issue Type: New Feature
          Components: annotation-processor
    Affects Versions: 4.2.0.Final
            Reporter: Alex Landini


Hibernate validator should provide something like JPA @AttributeOverride to override parent class constraints.

public class A {
    @Size(min = 1, max = 10)
    private String field1;

    @Min(2)
    private Integer field2;

    ...
}

@ConstraintOverrides({
    @ConstraintOverride(name="field1", constraint={@Size(min=4, max =20)}),
    @ConstraintOverride(name="startDate", constraint={@Min(1)})
})
public class B extends A {
    ...
}

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