[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3247) Provide more information in TypeMismatchException message

Szczepan Kuzniarz (JIRA) noreply at atlassian.com
Wed Apr 23 08:22:32 EDT 2008


Provide more information in TypeMismatchException message
---------------------------------------------------------

                 Key: HHH-3247
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3247
             Project: Hibernate3
          Issue Type: Improvement
          Components: core
    Affects Versions: 3.2.6
            Reporter: Szczepan Kuzniarz


When DefaultLoadEventListener throws TypeMismatchException it provides information about expected and actual id types:

"Provided id of the wrong type. Expected: " + idClass + ", got " + event.getEntityId().getClass()

but it says nothing about the offending class. It is not always the class which is loaded by client (it may be one of associated classes) and sometimes it's not easy to track it down. It would be nice if DefaultLoadEventListener would report something like this:

"Provided id of the wrong type for class " + persister.getEntityName() + ". Expected: " + idClass + ", got " + event.getEntityId().getClass()

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