No DbUpdateConcurrencyException when OracleDbContextOptionsBuilder.MaxBatchSize > 1
Hi,
we have an issue while enforcing optimistic concurrency in combination with an OracleDbContextOptionsBuilder.MaxBatchSize greater than 1 (eg. 50): there is no thrown DbUpdateConcurrencyException when there should be one.
How to reproduce:
- Create an Oracle table with a primary key ID column and a VARCHAR2 column that contains (stringified) GUID's.
- Scaffold a DbContext from that table and add .IsConcurrencyToken() for that VARCHAR2 column
- Set MaxBatchSize to 50
- Create two context objects from the same DbContext type and load the entity two times (each in one context). Change both entities and save them one after another. The second SaveChanges(Async) should throw a DbUpdateConcurrencyException, which is not the case when MaxBatchSize > 1.
We can provide the test case code if necessary. We also tried the same scenario with the Oracle 'managed' libary: the DbUpdateConcurrencyException is thrown regardless of the MaxBatchSize setting.
Thanks for your help.