兄弟初次使用Castle ActiveRecord数据持久,遇到个棘手问题!
我在给表里面create()数据的时候报了这个错误:
SQL insert, update or delete failed (expected affected row count: 1, actual affected row count: 2). Possible causes: the row was modified or deleted by another user, or a trigger is reporting misleading row count.
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: NHibernate.HibernateException: SQL insert, update or delete failed (expected affected row count: 1, actual affected row count: 2). Possible causes: the row was modified or deleted by another user, or a trigger is reporting misleading row count.
我仔细检查了一下发现是我表中有个insert触发器的原因,要是删除这个触发器就可以create()成功。各位有没有谁遇到过类似问题。。跪求一解啊!
我在给表里面create()数据的时候报了这个错误:
SQL insert, update or delete failed (expected affected row count: 1, actual affected row count: 2). Possible causes: the row was modified or deleted by another user, or a trigger is reporting misleading row count.
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: NHibernate.HibernateException: SQL insert, update or delete failed (expected affected row count: 1, actual affected row count: 2). Possible causes: the row was modified or deleted by another user, or a trigger is reporting misleading row count.
我仔细检查了一下发现是我表中有个insert触发器的原因,要是删除这个触发器就可以create()成功。各位有没有谁遇到过类似问题。。跪求一解啊!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货