Page 1 of 1

OptimisticConcurrencyException

Posted: Tue 12 Jun 2012 04:25
by jokrypta
Hello,

I am having a problem with the latest version of dotConnect for MySQL, v. 7.0.17.0 and Entity Framework 4 with Timestamp fields and Concurrency Mode = Fixed

Trying to update a record in "Table1", generates a second unexpected update query for "Table2" like this:

Code: Select all

UPDATE Table2
   SET `TimeStamp` = `TimeStamp`
 WHERE MyID = 3916 AND `TimeStamp` = '2012-01-01 00:00:00';
SELECT `TimeStamp`
  FROM Table2
 WHERE MyID = 3916 AND ROW_COUNT() = 1;
I guess this is throwing an OptimisticConcurrencyException because no records are modified and ROW_COUNT() = 1 is not true.

Table1 contains a FK relation to Table2 but the point is that I am not trying to change records in Table2.

Any suggestion?
Regards.
G.A.

Re: OptimisticConcurrencyException

Posted: Tue 12 Jun 2012 09:50
by jokrypta
Hello again,

I tried to downgrade to version 6.70.302

The second query is still generated but the OptimisticConcurrencyException is not thrown so my application works as expected.

Please let me know if you need further details.

Best regards.
G.A.

Re: OptimisticConcurrencyException

Posted: Thu 14 Jun 2012 16:45
by Shalex
Could you please send us a small test project so that we can reproduce the issue in our environment?