[hibernate-commits] Hibernate SVN: r18526 - annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Tue Jan 12 22:02:51 EST 2010


Author: stliu
Date: 2010-01-12 22:02:51 -0500 (Tue, 12 Jan 2010)
New Revision: 18526

Modified:
   annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/MapBinder.java
Log:
JBPAPP-3384 HHH-4257 map key type no longer inferred correctly, throws exception at runtime

Modified: annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/MapBinder.java
===================================================================
--- annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/MapBinder.java	2010-01-13 01:04:55 UTC (rev 18525)
+++ annotations/branches/v3_4_0_GA_CP/src/main/java/org/hibernate/cfg/annotations/MapBinder.java	2010-01-13 03:02:51 UTC (rev 18526)
@@ -110,7 +110,7 @@
 		}
 		else {
 			//this is a true Map mapping
-			//TODO ugly copy/pastle from CollectionBinder.bindManyToManySecondPass
+			//TODO ugly copy/paste from CollectionBinder.bindManyToManySecondPass
 			String mapKeyType;
 			Class target = void.class;
 			/*
@@ -239,12 +239,15 @@
 					if (mapKeyAnn != null && ! BinderHelper.isDefault( mapKeyAnn.type().type() ) ) {
 						elementBinder.setExplicitType( mapKeyAnn.type() );
 					}
+					else{
+						elementBinder.setType( property , elementClass );
+					}
 					mapValue.setIndex( elementBinder.make() );
 				}
 			}
 			//FIXME pass the Index Entity JoinColumns
 			if ( !collection.isOneToMany() ) {
-				//index column shoud not be null
+				//index column should not be null
 				for (Ejb3JoinColumn col : mapKeyManyToManyColumns) {
 					col.forceNotNull();
 				}



More information about the hibernate-commits mailing list