We are using devart / dotConnect (Version=9.6.675.0) with EF6 and Oracle 12c and noticed that setting the isolation level for a transaction to 'Serializable' seems to have no effect.
We know that we are not using latest version but we did not find any release notes concerning this topic either.
This post (2016) issues the same problem for MySql-DB as we have been facing for Oracle: viewtopic.php?t=33532
Here a test snipped to be run in 2 different instances / threads
Code: Select all
public void Test(Entities dbContext, string value)
{
using (var connection = dbContext.Connection)
{
connection.Open();
using (var transaction = connection.BeginTransaction(System.Data.IsolationLevel.Serializable))
{
var street = dbContext.Street.First(row => row.Id == 12345);
street.Name = value;
// <-- Break and sync executions here before SaveChanges()
dbContext.SaveChanges();
transaction.Commit();
}
}
}
Code: Select all
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
update street set name = 'Test' where id = 12345;
commit;
But upon transaction.Commit(); of first transaction we expect an Oracle Exception in second thread - which is not happening.
Is this a bug or are we doing something wrong?
Thanks in advance!
Phil