[hibernate-commits] Hibernate SVN: r10891 - branches/Branch_3_2/HibernateExt/tools/src/test5.0/org/hibernate/tool/hbm2x

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Thu Nov 30 05:34:38 EST 2006


Author: max.andersen at jboss.com
Date: 2006-11-30 05:34:36 -0500 (Thu, 30 Nov 2006)
New Revision: 10891

Modified:
   branches/Branch_3_2/HibernateExt/tools/src/test5.0/org/hibernate/tool/hbm2x/Hbm2JavaEjb3ForJDK50Test.java
Log:
workaround not-null association.

Modified: branches/Branch_3_2/HibernateExt/tools/src/test5.0/org/hibernate/tool/hbm2x/Hbm2JavaEjb3ForJDK50Test.java
===================================================================
--- branches/Branch_3_2/HibernateExt/tools/src/test5.0/org/hibernate/tool/hbm2x/Hbm2JavaEjb3ForJDK50Test.java	2006-11-30 10:34:17 UTC (rev 10890)
+++ branches/Branch_3_2/HibernateExt/tools/src/test5.0/org/hibernate/tool/hbm2x/Hbm2JavaEjb3ForJDK50Test.java	2006-11-30 10:34:36 UTC (rev 10891)
@@ -201,6 +201,11 @@
 
 		Object puppetInst = puppet.newInstance();
 		puppet.getMethod( "setName", new Class[]{String.class} ).invoke( puppetInst, new Object[]{"Barbie"} );
+		
+		if(className.equals("Bungalow")) { // hack to avoid not-null execption
+			puppet.getMethod("setMascot", new Class[] { puppet }).invoke( puppetInst, new Object[] { puppetInst } );
+		}
+		
 		s.getTransaction().begin();
 		s.persist( puppetInst );
 		s.getTransaction().commit();
@@ -238,4 +243,8 @@
 		};
 	}
 
+	protected void tearDown() throws Exception {
+		// TODO Auto-generated method stub
+		//super.tearDown();
+	}
 }




More information about the hibernate-commits mailing list