Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9343/NHibernate/Persister
Modified Files:
EntityPersister.cs
Log Message:
fixed another spot with copy & paste code for expected row count...
Index: EntityPersister.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Persister/EntityPersister.cs,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** EntityPersister.cs 28 Aug 2004 04:26:29 -0000 1.25
--- EntityPersister.cs 28 Aug 2004 17:19:30 -0000 1.26
***************
*** 803,813 ****
Dehydrate(id, fields, notNull, insertCmd, session);
! // IDbCommand REFACTOR
! // session.Batcher.AddToBatch(1);
! int rowCount = insertCmd.ExecuteNonQuery();
!
! //negative expected row count means we don't know how many rows to expect
! if ( rowCount > 0 && rowCount != 1)
! throw new HibernateException("SQL update or deletion failed (row not found)");
}
--- 803,807 ----
Dehydrate(id, fields, notNull, insertCmd, session);
! session.Batcher.AddToBatch(1);
}
***************
*** 925,929 ****
deleteCmd = session.Batcher.PrepareBatchCommand( SqlDeleteString );
}
!
try
--- 919,923 ----
deleteCmd = session.Batcher.PrepareBatchCommand( SqlDeleteString );
}
!
try
***************
*** 1012,1017 ****
if (!hasUpdateableColumns) return;
-
IDbCommand statement = null;
if( IsVersioned )
{
--- 1006,1011 ----
if (!hasUpdateableColumns) return;
IDbCommand statement = null;
+
if( IsVersioned )
{
|