[hibernate-commits] Hibernate SVN: r11185 - branches/Branch_3_2/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Feb 9 22:51:57 EST 2007


Author: epbernard
Date: 2007-02-09 22:51:57 -0500 (Fri, 09 Feb 2007)
New Revision: 11185

Modified:
   branches/Branch_3_2/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/MapBinder.java
Log:
ANN-549 map key with assoc table should be forced to not null

Modified: branches/Branch_3_2/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/MapBinder.java
===================================================================
--- branches/Branch_3_2/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/MapBinder.java	2007-02-10 00:14:40 UTC (rev 11184)
+++ branches/Branch_3_2/HibernateExt/annotations/src/java/org/hibernate/cfg/annotations/MapBinder.java	2007-02-10 03:51:57 UTC (rev 11185)
@@ -117,7 +117,6 @@
 			 * target has priority over reflection for the map key type
 			 */
 			if ( property.isAnnotationPresent( org.hibernate.annotations.MapKey.class ) ) {
-				ReflectionManager reflectionManager = mappings.getReflectionManager();
 				target = property.getAnnotation( org.hibernate.annotations.MapKey.class ).targetElement();
 			}
 			else if ( property.isAnnotationPresent( MapKeyManyToMany.class ) ) {
@@ -239,6 +238,12 @@
 				}
 			}
 			//FIXME pass the Index Entity JoinColumns
+			if ( ! collection.isOneToMany() ) {
+				//index column shoud not be null
+				for ( Ejb3JoinColumn col : mapKeyManyToManyColumns ) {
+					col.forceNotNull();
+				}
+			}
 			if ( isIndexOfEntities ) {
 				bindManytoManyInverseFk(
 						collectionEntity,




More information about the hibernate-commits mailing list