Can't update on mono when field was null

Can't update on mono when field was null

Postby sitek » Wed 20 Jul 2011 18:38

I have table with nullable field Text. When I want to update data, SubmitChanges method throws ChangeConflictException: Row not found or changed.
Datacontext generates command:
Code: Select all
UPDATE ADPH.test SET `Text` = :p1 WHERE Id = :key1 AND ((:nullchk1 = 1 AND `Text` IS NULL) OR (`Text` = :chk1))
-- p1: Input VarChar (Size = 4; DbType = AnsiString) [ssss]
-- key1: Input Int (Size = 0; DbType = Int32) [1]
-- nullchk1: Input Int (Size = 0; DbType = Int32) [0]
-- chk1: Input VarChar (Size = 0; DbType = AnsiString) []
-- Context: Devart.Data.MySql.Linq.Provider.MySqlDataProvider Model: al Build: 2.50.27.0

I think, the problem is nullchk1 parameter. It should be 1. Can I change it anyway?

I use Mono Runtime Version: 2.10.2 ; ASP.NET Version: 4.0.30319.1
sitek
 
Posts: 3
Joined: Thu 01 Oct 2009 09:35

Postby StanislavK » Fri 22 Jul 2011 11:53

Thank you for the report, we've reproduced this issue. We will analyze it and inform you about the results.

As a temporary workaround, you can disable the update check for the problem column.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for MySQL