Hello I have a problem when I save twice the same entity created by code.
I set the flag is New = false because I want to get an update.
The DQE creates the update and runs it but pui lifts me except a competition ..
but it should not do so because the sql is correct I will have only zero rows updated but does not mean that there was a problem of competition ..
How can I avoid the exception?
In any case I would like to distinguish it from a real exception of competition that may occur ..
For me zero rows updated it means that the contents of the collection was exactly the same as the database..se I run the update from the MySql console will not get an error but simply zero rows updated ..
I do not know if it is a problem of version 5 with 3 I have never encountered this problem ..
Thank you
Query form script SQL
UPDATE ul01s_customers SET CustomerID = 148, ContactName = 'ddrr', ContactTitle = '1', CompanyName = '1', Country = '1' WHERE CustomerID = 148;
Result:
SQL.sql: 0 rows updated [0,022s]
Same query From LLBLGen5
Method Enter: CreateSingleTargetUpdateDQ(4)
Generated Sql query:
Query: UPDATE `ul01s_customers` SET `CompanyName`=@p1, `ContactName`=@p2, `ContactTitle`=@p3, `Country`=@p4 WHERE ( `ul01s_customers`.`CustomerID` = @p5)
Parameter: @p1 : AnsiString. Length: 255. Precision: 0. Scale: 0. Direction: Input. Value: "1".
Parameter: @p2 : AnsiString. Length: 255. Precision: 0. Scale: 0. Direction: Input. Value: "ddrr".
Parameter: @p3 : AnsiString. Length: 255. Precision: 0. Scale: 0. Direction: Input. Value: "1".
Parameter: @p4 : AnsiString. Length: 255. Precision: 0. Scale: 0. Direction: Input. Value: "1".
Parameter: @p5 : Int32. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: 148.
Method Exit: CreateSingleTargetUpdateDQ(4)
Method Exit: CreateUpdateDQ(4)
Method Enter: DataAccessAdapterBase.ExecuteActionQuery
Method Enter: DataAccessAdapterBase.OpenConnection
Method Exit: DataAccessAdapterBase.OpenConnection
Method Exit: DataAccessAdapterBase.ExecuteActionQuery
Method Enter: DataAccessAdapterBase.Rollback
Method Exit: DataAccessAdapterBase.Rollback
Eccezione generata: 'SD.LLBLGen.Pro.ORMSupportClasses.ORMConcurrencyException' in SD.LLBLGen.Pro.ORMSupportClasses.dll
'iisexpress.exe' (CLR v4.0.30319: /LM/W3SVC/2/ROOT-1-131076282482120735): caricamento di 'C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\14.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll' completato. Caricamento dei simboli ignorato. Il modulo è ottimizzato e l'opzione del debugger 'Solo codice utente' è abilitata.