这个错误在nhibernate中意味着什么 [英] what does this error mean in nhibernate

查看:143
本文介绍了这个错误在nhibernate中意味着什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



行被另一个事务更新或删除了(或者未保存值映射不正确):[MyDomainObject]

错误中没有附加信息。是否有一些建议的方式来帮助识别根本问题,或者有人可以给我一个更好的解释,这个错误表明或是一个症状。

一些额外的信息< h2>

我查看了这个对象,所有的数据看起来都很好,它有一个ID等等。 。

请注意,这是从asp.net-mvc网站的单个调用堆栈中运行的,所以我不希望有任何线程问题需要担心这意味着你有多个事务访问相同的数据,从而产生并发问题。你应该改进你的数据访问处理,你可能正在更新来自多个线程的数据,将更改后的数据联合到队列中,处理所有对数据库的访问。


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.

解决方案

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.

这篇关于这个错误在nhibernate中意味着什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆