[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5249) Component.java MappingException needs more detail

Travis Stevens (JIRA) noreply at atlassian.com
Thu May 20 19:18:11 EDT 2010


Component.java MappingException needs more detail
-------------------------------------------------

                 Key: HHH-5249
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5249
             Project: Hibernate Core
          Issue Type: Improvement
          Components: core
    Affects Versions: 3.5.2, 3.5.0-Final
         Environment: Hibernate version: 3.5.0-Final
            Reporter: Travis Stevens
            Priority: Trivial
         Attachments: mrxtravis-component.patch

A MappingException is thrown in the Component.java class that looks like such:

throw new MappingException("component property not found: " + propertyName);

I received this message when the property was 'id' -- and since every component has an 'id', this was not a very useful message.  I'm supplying a patch that will add the componentClassName property of Component to the exception as to put the property in a useful context.  The fix is :

throw new MappingException("component " + componentClassName + " property not found: " + propertyName);

See attachment for the patch to 3.5.0-Final


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