OptimisticConcurrencyException

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
jokrypta
Posts: 5
Joined: Tue 12 Jun 2012 03:54

OptimisticConcurrencyException

Post by jokrypta » Tue 12 Jun 2012 04:25

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.

jokrypta
Posts: 5
Joined: Tue 12 Jun 2012 03:54

Re: OptimisticConcurrencyException

Post by jokrypta » Tue 12 Jun 2012 09:50

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: OptimisticConcurrencyException

Post by Shalex » Thu 14 Jun 2012 16:45

Could you please send us a small test project so that we can reproduce the issue in our environment?

Post Reply