diff --git a/code/core/src/main/java/org/hibernate/Transaction.java b/code/core/src/main/java/org/hibernate/Transaction.java index 0e7faf7d5a..e306071029 100644 --- a/code/core/src/main/java/org/hibernate/Transaction.java +++ b/code/core/src/main/java/org/hibernate/Transaction.java @@ -32,7 +32,7 @@ public interface Transaction { /** * Flush the associated Session and end the unit of work (unless - * we are in {@link FlushMode#NEVER}. + * we are in {@link FlushMode#MANUAL}. *

* This method will commit the underlying transaction if and only * if the underlying transaction was initiated by this object. diff --git a/code/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java b/code/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java index 4ce5c59c20..355977830d 100644 --- a/code/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java +++ b/code/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java @@ -4442,7 +4442,7 @@ public class FooBarTest extends LegacyTestCase { s.connection().commit(); s.close(); s = openSession(); - s.setFlushMode(FlushMode.NEVER); + s.setFlushMode(FlushMode.MANUAL); l = (Location) s.find("from Location l where l.countryCode = 'AU' and l.description='foo bar'").get(0); assertTrue( l.getCountryCode().equals("AU") ); assertTrue( l.getCity().equals("Melbourne") ); @@ -4746,7 +4746,7 @@ public class FooBarTest extends LegacyTestCase { s.close(); s = openSession(); - s.setFlushMode(FlushMode.NEVER); + s.setFlushMode(FlushMode.MANUAL); t = s.beginTransaction(); Foo foo = (Foo) s.get(Foo.class, id); t.commit(); diff --git a/code/testsuite/src/test/java/org/hibernate/test/legacy/FumTest.java b/code/testsuite/src/test/java/org/hibernate/test/legacy/FumTest.java index b62424fb79..32691a8942 100644 --- a/code/testsuite/src/test/java/org/hibernate/test/legacy/FumTest.java +++ b/code/testsuite/src/test/java/org/hibernate/test/legacy/FumTest.java @@ -719,7 +719,7 @@ public class FumTest extends LegacyTestCase { /////////////////////////////////////////////////////////////////////////// // Test insertions across serializations Session s = getSessions().openSession(); - s.setFlushMode(FlushMode.NEVER); + s.setFlushMode(FlushMode.MANUAL); Simple simple = new Simple(); simple.setAddress("123 Main St. Anytown USA"); @@ -751,7 +751,7 @@ public class FumTest extends LegacyTestCase { /////////////////////////////////////////////////////////////////////////// // Test updates across serializations s = getSessions().openSession(); - s.setFlushMode(FlushMode.NEVER); + s.setFlushMode(FlushMode.MANUAL); simple = (Simple) s.get( Simple.class, new Long(10) ); assertTrue("Not same parent instances", check.getName().equals( simple.getName() ) ); @@ -773,7 +773,7 @@ public class FumTest extends LegacyTestCase { /////////////////////////////////////////////////////////////////////////// // Test deletions across serializations s = getSessions().openSession(); - s.setFlushMode(FlushMode.NEVER); + s.setFlushMode(FlushMode.MANUAL); simple = (Simple) s.get( Simple.class, new Long(10) ); assertTrue("Not same parent instances", check.getName().equals( simple.getName() ) ); @@ -795,7 +795,7 @@ public class FumTest extends LegacyTestCase { /////////////////////////////////////////////////////////////////////////// // Test collection actions across serializations s = getSessions().openSession(); - s.setFlushMode(FlushMode.NEVER); + s.setFlushMode(FlushMode.MANUAL); Fum fum = new Fum( fumKey("uss-fum") ); fum.setFo( new Fum( fumKey("uss-fo") ) ); @@ -824,7 +824,7 @@ public class FumTest extends LegacyTestCase { s.close(); s = getSessions().openSession(); - s.setFlushMode(FlushMode.NEVER); + s.setFlushMode(FlushMode.MANUAL); fum = (Fum) s.load( Fum.class, fum.getId() ); assertTrue("the Fum.friends did not get saved", fum.getFriends().size() == 2); @@ -842,7 +842,7 @@ public class FumTest extends LegacyTestCase { s.close(); s = getSessions().openSession(); - s.setFlushMode(FlushMode.NEVER); + s.setFlushMode(FlushMode.MANUAL); fum = (Fum) s.load( Fum.class, fum.getId() ); assertTrue("the Fum.friends is not empty", fum.getFriends() == null || fum.getFriends().size() == 0); s.connection().commit(); diff --git a/code/testsuite/src/test/java/org/hibernate/test/proxy/ProxyTest.java b/code/testsuite/src/test/java/org/hibernate/test/proxy/ProxyTest.java index dc70950230..af3c3c273a 100755 --- a/code/testsuite/src/test/java/org/hibernate/test/proxy/ProxyTest.java +++ b/code/testsuite/src/test/java/org/hibernate/test/proxy/ProxyTest.java @@ -325,7 +325,7 @@ public class ProxyTest extends FunctionalTestCase { s.close(); s = openSession(); - s.setFlushMode( FlushMode.NEVER ); + s.setFlushMode( FlushMode.MANUAL ); t = s.beginTransaction(); // load the last container as a proxy Container proxy = ( Container ) s.load( Container.class, lastContainerId );