This is what the manual says. As I understand it is not related to versioning which is a different thing. And to see which field is updated It doesn’t need to compare the local data to database. It supposed to use the copy of the record as it was loaded from the database. And this is a default behaviour of Aurelius. The only thing is that I am using the xdatawebdataset not doing it manually through the manager as you can see in the project.
If you think the project info I sent you still doesn’t give you all details you need please let us know how can we get the paid support we were asking about. We really need to fix this issue ASAP.
When updating objects, Aurelius detects which property have changed since the entity was loaded from the database in the manager, and it only updates those columns in the database. For example, suppose two users load the same TCustomer (with same id) from the database at the same time:
User1Customer := Manager1.Find<TCustomer>(1);
User2Customer := Manager2.Find<TCustomer>(1);
Now first user changes customer's city and update, and second user changes customer's document and update:
User1Customer.City := 'New City';
User2Customer.Document := '012345';
Here are the SQL executed by Aurelius for each user (SQL were simplified for better understanding, the actual SQL uses parameters):
Set City = 'New City'
Where Id = 1
Set Document = '012345'
Where Id = 1
Even if TCustomer class has lots of customer, and some properties might be outdated in memory, it doesn't cause any trouble or data loss here, because only changed data will be commited to the database. In the end, the TCustomer object in database will have both the new city and new document correct.
This is a basic mechanism that solves concurrency problems in many cases. If it's not enough, you can use entity versioning.