[hibernate-issues] [Hibernate-JIRA] Resolved: (HV-265) Constraints not loaded consistently for inherited classes

Hardy Ferentschik (JIRA) noreply at atlassian.com
Mon Nov 2 15:17:53 EST 2009


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

Hardy Ferentschik resolved HV-265.
----------------------------------

    Resolution: Duplicate

> Constraints not loaded consistently for inherited classes
> ---------------------------------------------------------
>
>                 Key: HV-265
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-265
>             Project: Hibernate Validator
>          Issue Type: Bug
>          Components: mapping
>    Affects Versions: 4.0.0.GA
>         Environment: Win XP, Sun Java 1.6
>            Reporter: Jaro Kuruc
>            Assignee: Hardy Ferentschik
>             Fix For: 4.0.2
>
>         Attachments: hibernate-validator-tests.zip, org.hibernate.validator.InheritanceMappingsTest.txt, stdout.txt
>
>
> Hi, please find attached project demonstrating inconsistency in loading constraints when using annotations vs. XML mappings. This is sometimes causing that validator does not validate field 'detail.competition.name' in org.hibernate.validator.xml.Competition class.
> The test demonstrates 3 cases:
> 1. Using default configuration on top of annotated beans - works as expected
> 2. Using explicit configuration mappings on top of annotated beans - works as expected
> 3. Using explicit configuration mappings on top of non-annotated beans - does not work as expected
> The third case works only if both subclasses of org.hibernate.validator.xml.Competition (org.hibernate.validator.xml.PersonCompetition and org.hibernate.validator.xml.TeamCompetition) are defined in mappings file as beans, even though they are not adding any new fields to validate. The problem is that in this case, the field they inherited is ignored by validator and not validated.

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