[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5236) Exception with hibernate model

Michael Zhang (JIRA) noreply at atlassian.com
Tue May 18 14:59:10 EDT 2010


Exception with hibernate model
------------------------------

                 Key: HHH-5236
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5236
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
    Affects Versions: 3.5.2, 3.5.0-Final, 3.2.0.ga
         Environment: Java 1.5
Windows/Unix

            Reporter: Michael Zhang


I have a hibernate model class member e.g. (active) that is mapped to a string (either "Y" or "N"). Both getter and setter are implemented.  There is also another method in the class: public boolean isActive()...

When test it from JUnit, everything works fine.  However when the class is accessed from thread with database update operation, hibernate will throw ClassCast exception from Boolean to String. 

If the method of "isActive" is changed to something else such as "isActiveMethod", the exception will disappeare.

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