From: <dar...@us...> - 2009-06-09 18:34:52
|
Revision: 4433 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4433&view=rev Author: darioquintana Date: 2009-06-09 18:34:49 +0000 (Tue, 09 Jun 2009) Log Message: ----------- Minor: Using Transaction instead of Flush() (passing for MySQL) Modified Paths: -------------- trunk/nhibernate/src/NHibernate.Test/QueryTest/DetachedQueryFixture.cs Modified: trunk/nhibernate/src/NHibernate.Test/QueryTest/DetachedQueryFixture.cs =================================================================== --- trunk/nhibernate/src/NHibernate.Test/QueryTest/DetachedQueryFixture.cs 2009-06-09 17:32:21 UTC (rev 4432) +++ trunk/nhibernate/src/NHibernate.Test/QueryTest/DetachedQueryFixture.cs 2009-06-09 18:34:49 UTC (rev 4433) @@ -27,23 +27,25 @@ protected override void OnSetUp() { - using (ISession s = OpenSession()) + using (var s = OpenSession()) + using(var tx = s.BeginTransaction()) { for (int i = 0; i < totalFoo; i++) { Foo f = new Foo("N" + i, "D" + i, i); s.Save(f); } - s.Flush(); + tx.Commit(); } } protected override void OnTearDown() { - using (ISession s = OpenSession()) + using (var s = OpenSession()) + using(var tx = s.BeginTransaction()) { s.Delete("from Foo"); - s.Flush(); + tx.Commit(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |