[hibernate-commits] Hibernate SVN: r15876 - core/branches/Branch_3_2/test/org/hibernate/test/sql/hand/custom/sybase.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Tue Feb 3 19:50:58 EST 2009


Author: gbadner
Date: 2009-02-03 19:50:58 -0500 (Tue, 03 Feb 2009)
New Revision: 15876

Modified:
   core/branches/Branch_3_2/test/org/hibernate/test/sql/hand/custom/sybase/Mappings.hbm.xml
Log:
HHH-3685 - Added workaround to unit test for creating Sybase stored procedures in chained transaction mode


Modified: core/branches/Branch_3_2/test/org/hibernate/test/sql/hand/custom/sybase/Mappings.hbm.xml
===================================================================
--- core/branches/Branch_3_2/test/org/hibernate/test/sql/hand/custom/sybase/Mappings.hbm.xml	2009-02-03 23:25:10 UTC (rev 15875)
+++ core/branches/Branch_3_2/test/org/hibernate/test/sql/hand/custom/sybase/Mappings.hbm.xml	2009-02-04 00:50:58 UTC (rev 15876)
@@ -181,7 +181,7 @@
 		</return>
 		{ call selectAllEmployments() }
 	</sql-query>
-	
+	
 	<database-object>
 		<create>
 		CREATE PROCEDURE selectAllEmployments AS
@@ -194,8 +194,18 @@
 		</drop>
 	</database-object>
 	
+	<!-- The following is a workaround for HHH-3685 so that SchemaExport --> 
+	<!-- changes the transaction mode of selectAllEmployments to "chained" -->
 	<database-object>
 		<create>
+		sp_procxmode selectAllEmployments, 'chained'
+		</create>
+		<!-- no drop command corresponding to "sp_procxmode ..." -->
+		<drop/>
+	</database-object>
+
+	<database-object>
+		<create>
 		CREATE PROCEDURE paramHandling @j int, @i int AS
 			SELECT @j as value, @i as value2
 		</create>
@@ -203,9 +213,19 @@
 		DROP PROCEDURE paramHandling
 		</drop>
 	</database-object>
-	
+
+	<!-- The following is a workaround for HHH-3685 so that SchemaExport --> 
+	<!-- changes the transaction mode of paramHandling to "chained" -->
 	<database-object>
 		<create>
+		sp_procxmode paramHandling, 'chained'
+		</create>
+		<!-- no drop command corresponding to "sp_procxmode ..." -->
+		<drop/>
+	</database-object>
+
+	<database-object>
+		<create>
 		CREATE PROCEDURE simpleScalar @number int AS
 			SELECT @number as value, 'getAll' as name
 		</create>
@@ -213,5 +233,15 @@
 		DROP PROCEDURE simpleScalar
 		</drop>
 	</database-object>
-	
+
+	<!-- The following is a workaround for HHH-3685 so that SchemaExport --> 
+	<!-- changes the transaction mode of simpleScalar to "chained" -->
+	<database-object>
+		<create>
+		sp_procxmode simpleScalar, 'chained'
+		</create>
+		<!-- no drop command corresponding to "sp_procxmode ..." -->
+		<drop/>
+	</database-object>
+
 </hibernate-mapping>




More information about the hibernate-commits mailing list