From: Michael D. <mik...@us...> - 2004-09-15 13:18:42
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv768/NHibernate/Impl Modified Files: BatcherImpl.cs Log Message: Cleaned up code around assigning connection to a command. Index: BatcherImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/BatcherImpl.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** BatcherImpl.cs 15 Sep 2004 03:17:46 -0000 1.6 --- BatcherImpl.cs 15 Sep 2004 13:18:32 -0000 1.7 *************** *** 101,105 **** } ! command.Connection = session.Connection; if( session.Transaction!=null ) { --- 101,117 ---- } ! if( command.Connection!=null ) ! { ! if( command.Connection!=session.Connection ) ! { ! throw new AssertionFailure("The IDbCommand for " + command.CommandText + " has a different connection " + ! "than the Connection the Session is providing."); ! } ! } ! else ! { ! command.Connection = session.Connection; ! } ! if( session.Transaction!=null ) { |