From: Michael D. <mik...@us...> - 2004-08-28 15:31:55
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24524/NHibernate/Collection Modified Files: CollectionPersister.cs Log Message: Removed all the hacks with expected row count now that batcher is implemented. Index: CollectionPersister.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Collection/CollectionPersister.cs,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** CollectionPersister.cs 28 Aug 2004 04:23:44 -0000 1.27 --- CollectionPersister.cs 28 Aug 2004 15:31:46 -0000 1.28 *************** *** 717,728 **** WriteKey(st, id, false, session); collection.WriteTo(st, this, entry, i, false); ! //TODO: this is hackish for expected row count ! int expectedRowCount = 1; ! int rowCount = st.ExecuteNonQuery(); ! ! //negative expected row count means we don't know how many rows to expect ! if ( expectedRowCount>0 && expectedRowCount!=rowCount ) ! throw new HibernateException("SQL update or deletion failed (row not found)"); ! //session.Batcher.AddToBatch(1); } i++; --- 717,721 ---- WriteKey(st, id, false, session); collection.WriteTo(st, this, entry, i, false); ! session.Batcher.AddToBatch(1); } i++; |