I am using v965 to generate my bussiness classe. And manually modify the code to added the concurrency control.
- Code: Select all
[TableColumn(\"RowVersion\", NullValue=1), Concurrency]
The number of returned rows 0 did not match the expected count of 1+.
If concurrency control is enabled this may indicate that the record was updated or deleted by another process.
The error is pointint to the generated class, line 124.
- Code: Select all
Line 122: if (IsChanged || !IsPersisted)
Line 123: {
Line 124: base.Persist();
Line 125: isChanged = false;
Line 126: }
The C# code in code behind is very simple:
- Code: Select all
MyObject _theObject = MyObject.Retrieve(myKey);
_theObject.OneField = \"some new value\";
_theObject.Persist();
Anyone knows why this happened? The record in the database is not updated nor deleted. The OneField is not a primary key. How to fix this? Thanks a million!
