Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27513/nhibernate/src/NHibernate/Impl
Modified Files:
PreparerImpl.cs
Log Message:
Fixed problem where Commands from a string prepared in a Session with a
Transaction that is Disconnected and Reconnected were not associated
with the correct IDbTransaction. Found during writing of
FooBarTest.UserSuppliedConnection
Index: PreparerImpl.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/PreparerImpl.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PreparerImpl.cs 25 Jun 2004 20:42:24 -0000 1.5
--- PreparerImpl.cs 16 Jul 2004 03:57:56 -0000 1.6
***************
*** 127,131 ****
// don't need to be confused by that - just a normal part of initialization...
if(command.Transaction!=null)
! log.Warn("The IDbCommand had a different Transaction than the Session.");
command.Transaction = sessionAdoTrx;
--- 127,132 ----
// don't need to be confused by that - just a normal part of initialization...
if(command.Transaction!=null)
! log.Warn("The IDbCommand had a different Transaction than the Session. This can occur when " +
! "Disconnecting and Reconnecting Sessions because the PreparedCommand Cache is Session specific.");
command.Transaction = sessionAdoTrx;
***************
*** 180,184 ****
if(preparedCommands.ContainsKey(sqlString))
{
! return (IDbCommand)preparedCommands[sqlString];
}
--- 181,187 ----
if(preparedCommands.ContainsKey(sqlString))
{
! cmd = (IDbCommand)preparedCommands[sqlString];
! cmd = JoinTransaction(cmd);
! return cmd;
}
|