Not the first, won't be the last :)

On Tue, Jul 28, 2009 at 8:42 PM, Mikael Henriksson <[email protected]>wrote:

> Don't mean to be rude or anything but LOL! I did the same thing but
> completely opposite :)
>
> 2009/7/28 James Gregory <[email protected]>
>
> You want the NHibernate mailing list<http://groups.google.com/group/nhusers>,
>> not the F*luent* NHibernate mailing list.
>>
>>
>> On Tue, Jul 28, 2009 at 6:13 PM, Hfern <[email protected]>wrote:
>>
>>>
>>> I am using version 1.2.1.400 of Nhibernate
>>> while trying to delete a row from the database I get the following
>>> error.The row does get deleted
>>> [NHibernate.StaleStateException]        {"Unexpected row count: -1;
>>> expected:
>>> 1"}
>>>
>>>
>>>
>>> here is the stack trace
>>> ---------------------------------
>>> at
>>> NHibernate.AdoNet.Expectations.BasicExpectation.VerifyOutcomeNonBatched
>>> (Int32 rowCount, IDbCommand statement) at
>>> NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation
>>> expectation) at
>>> NHibernate.Persister.Entity.AbstractEntityPersister.Delete(Object id,
>>> Object version, Int32 j, Object obj, SqlCommandInfo sql,
>>> ISessionImplementor session, Object[] loadedState) at
>>> NHibernate.Persister.Entity.AbstractEntityPersister.Delete(Object id,
>>> Object version, Object obj, ISessionImplementor session) at
>>> NHibernate.Action.EntityDeleteAction.Execute() at
>>> NHibernate.Engine.ActionQueue.Execute(IExecutable executable) at
>>> NHibernate.Engine.ActionQueue.ExecuteActions(IList list) at
>>> NHibernate.Engine.ActionQueue.ExecuteActions() at
>>> NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions
>>> (IEventSource session) at
>>> NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent
>>> event) at NHibernate.Impl.SessionImpl.Flush() at
>>> NHibernate.Transaction.AdoTransaction.Commit() at
>>>
>>> code snippet
>>> ---------------
>>> ISession session = factory.OpenSession();
>>> ITransaction transaction = session.BeginTransaction();
>>>
>>> session.BeginTransaction(0);
>>> session.delete(instance) /// instance is the row object that I am
>>> trying to delte
>>> transaction.commit
>>> session.Close();
>>>
>>> I have SET NOCOUNT ON in the stored procedure
>>> Is this a bug in NHibernate
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to