Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 4

3975927Jun 4 2019 — edited Jun 5 2019

当前环境:

netcore 2.2  / oracle 11.2 / Oracle.EntityframeworkCore(2.19.0-beta4)

在_dbContext.SaveChangesAsync()  报错

DbUpdateConcurrencyException: Database operation expected to affect 1 row(s) but actually affected 449 row(s). Data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.

现有情况分析:

1.不存在并发操作问题,是单线程执行操作

2.是对单一entity操作,但这个entity包含多个其他类型entity,对应多张其他表。

3.这是Oracle.EntityframeCore的问题

SaveChangesAsync

Comments
Post Details
Added on Jun 4 2019
1 comment
1,510 views