It is sometimes useful to be able to get a list of changes between the originally loaded version of an entity and the in-memory version. For example, this could be used for confirmation or auditing purposes. LightSpeed supports this through the Entity.ChangeTracker property.
Change tracking is not enabled by default because it can add a significant overhead to the size of each entity. To enable change tracking, set ChangeTracker.TrackingMode to ChangeTrackingMode.ChangesOnly. (Only changes made after you have enabled change tracking are recorded.)
To get the list of changes, use the ChangeTracker.Changes property.
Enabling change tracking does not change LightSpeed’s default behaviour of saving all fields. This is because change tracking does not in itself support optimistic concurrency checking.
To save only changed fields you have two options available. Either set Optimistic Concurrency Checking to true in the designer (or create a LockVersion field in your entity), as described under Concurrent Editing above or you can apply the [UnversionedPartialUpdate] attribute to your entity to indicate that only changed fields should be persisted if the values in the database match the original values when the entity was loaded.