[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2107) DefaultLoadEventListener throws TypeMismatchException for EntityMode.MAP for component type when it should not

Koen Rabaey (JIRA) noreply at atlassian.com
Tue Sep 26 10:58:25 EDT 2006


DefaultLoadEventListener throws TypeMismatchException for EntityMode.MAP for component type when it should not
--------------------------------------------------------------------------------------------------------------

         Key: HHH-2107
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2107
     Project: Hibernate3
        Type: Bug

  Components: core  
    Versions: 3.2.0.cr4    
 Environment: 3.2.0.cr4
    Reporter: Koen Rabaey
    Priority: Minor


When using EntityMode.MAP for component types a TypeMismatchException is thrown.

Following code in the onLoad method of class DefaultLoadEventListener should probably replaced :

change from :

                        if ( persister.getIdentifierType().isComponentType() && EntityMode.DOM4J == event.getSession().getEntityMode() ) {
			// skip this check for composite-ids relating to dom4j entity-mode;

to : 

		if ( persister.getIdentifierType().isComponentType() && (EntityMode.DOM4J == event.getSession().getEntityMode() || EntityMode.MAP == event.getSession().getEntityMode() )) {
			// skip this check for composite-ids relating to dom4j and map entity-mode;


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