You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, I have run into an issue, when using the BulkUpdate() method, it does not enforce the optimistic concurrency check.
When having the 'RowVersion' column, and in concurrent scenarios, BulkUpdate() just overwrites the changes, ignoring the fact that the same version of data was already modified by different source.
Could you help with that please?
The text was updated successfully, but these errors were encountered:
Hello!
Thank you for a great and fast library!
Unfortunately, I have run into an issue, when using the BulkUpdate()
method, it does not enforce the optimistic concurrency check.
When having the 'RowVersion' column, and in concurrent scenarios,
BulkUpdate() just overwrites the changes, ignoring the fact that the same
version of data was already modified by different source.
Could you help with that please?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#34>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2BSRMCDKD6WOD3KANVNDTTOD5HNANCNFSM45AIXF6A>
.
Sure, it is fairly easy to reproduce. Here is some pseudocode:
public class Item
{
public long Id { get; set; }
public string Name { get; set; }
public byte[] RowVersion { get; set; }
}
// query for item with rowversion using EF 6
var item = await _dbContext.Items.FirstOrDefaultAsync();
// update name
item.Name = "New Name";
// save the updated entity
_dbContext.SaveChangesAsync();
var updateRequest = new BulkUpdateRequest
{
Entities = new List<Item> { item } as IList,
UpdatedColumnNames = new[]
{
nameof(Item.Name);
}
};
// do bulk update on already updated entity, row version is different for it in DB, but no exception thrown, and changes are //overwritten
_dbContext.BulkUpdateAll(updateRequest);
Hello!
Thank you for a great and fast library!
Unfortunately, I have run into an issue, when using the BulkUpdate() method, it does not enforce the optimistic concurrency check.
When having the 'RowVersion' column, and in concurrent scenarios, BulkUpdate() just overwrites the changes, ignoring the fact that the same version of data was already modified by different source.
Could you help with that please?
The text was updated successfully, but these errors were encountered: