This project is read-only.
1
Vote

Unexpected row count: 0; expected: 1

description

I try to get the IList<T>,and the problem is come out.the operation code is : IList<MedOperationSchedule> medOperSches = medOperationScheduleRepository.GetByPatientId(pid); and the debug in the log is :
 
NHibernate.StaleStateException: Unexpected row count: 0; expected: 1
在 NHibernate.AdoNet.Expectations.BasicExpectation.VerifyOutcomeNonBatched(Int32 rowCount, IDbCommand statement)
在 NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation expectation)
在 NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session)
在 NHibernate.Persister.Entity.AbstractEntityPersister.UpdateOrInsert(Object id, Object[] fields, Object[] oldFields, Object rowId, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session)
在 NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object obj, Object rowId, ISessionImplementor session)
在 NHibernate.Action.EntityUpdateAction.Execute()
在 NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
在 NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
在 NHibernate.Engine.ActionQueue.ExecuteActions()
在 NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
what's wrong ?

comments