Search code examples
nhibernatefluent-nhibernate

what does this error mean in nhibernate


Out of the blue, i am getting this error when doing a number of updates using nhibernate.

Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [MyDomainObject]

there is no additional information in the error. Is there some recommended way to help identify the root issue or can someone give me a better explanation on what this error indicated or is a sympton around.

Some additional info

I looked at the object and all of the data looks fine, it has an ID, etc . .

Note this is running in a single call stack from an asp.net-mvc website so i wouldn't expect there to be any threading issues to worry about in terms of concurrency.


Solution

  • It means that you have multiple transactions accessing the same data, thus producing concurrency issues. You should improve on your data access handling, you probably are updating data from multiple threads, syndicate the changed data into a queue first which handles all the access to the db.