[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Collapse]eXpress Persistent Objects
 [Expand]Product Information
 [Expand]Getting Started
 [Expand]Fundamentals
 [Expand]Feature Center
 [Expand]Concepts
 [Expand]Design-Time Features
 [Expand]Examples
 [Expand]Member Tables
 [Collapse]API Reference
  [Collapse]DevExpress.Xpo
   [Expand]AggregatedAttribute Class
   [Expand]AssociationAttribute Class
    AsyncBehavior Enumeration
    AsyncCommitCallback Delegate
    AsyncSelectDataCallback Delegate
    CacheBehavior Enumeration
    CollectionBindingBehavior Enumeration
   [Expand]ColumnDbDefaultValueAttribute Class
   [Expand]ColumnDefaultValueAttribute Class
   [Expand]CommitObjectStubsResult Class
   [Expand]CustomAttribute Class
   [Expand]CustomCriteriaManager Class
   [Expand]DataViewPropertiesCollection Class
   [Expand]DataViewProperty Class
   [Expand]DataViewRecord Class
   [Expand]DbTypeAttribute Class
    DefaultMembersPersistence Enumeration
   [Expand]DefaultMembersPersistenceAttribute Class
   [Expand]DeferredDeletionAttribute Class
   [Expand]DelayedAttribute Class
   [Expand]DisplayNameAttribute Class
   [Expand]ExplicitLoadingAttribute Class
   [Expand]ExplicitUnitOfWork Class
   [Expand]FetchOnlyAttribute Class
   [Expand]GetObjectStubsByKeyQuery Class
    GuidGenerationMode Enumeration
   [Expand]HiddenAttribute Class
   [Expand]ICustomCriteriaOperatorQueryable Interface
   [Expand]ICustomFunctionOperatorQueryable Interface
   [Expand]IDataLayer Interface
   [Expand]IDataLayerAsync Interface
    IdentityMapBehavior Enumeration
   [Expand]IndexedAttribute Class
   [Expand]IndicesAttribute Class
   [Expand]IObjectLayer Interface
   [Expand]IObjectLayerAsync Interface
   [Expand]IObjectLayerEx Interface
   [Expand]IObjectLayerOnSession Interface
   [Expand]ISerializableObjectLayer Interface
   [Expand]ISerializableObjectLayerEx Interface
   [Expand]IXPModificationsStore Interface
   [Expand]IXPObject Interface
   [Expand]IXPSimpleObject Interface
   [Expand]KeyAttribute Class
   [Expand]LoadDataMemberOrderItem Structure
    LockingOption Enumeration
   [Expand]MapInheritanceAttribute Class
    MapInheritanceType Enumeration
   [Expand]MapToAttribute Class
   [Expand]MemberDesignTimeVisibilityAttribute Class
   [Expand]MergeCollisionBehaviorAttribute Class
   [Expand]NestedUnitOfWork Class
   [Expand]NoForeignKeyAttribute Class
   [Expand]NonPersistentAttribute Class
   [Expand]NullableAttribute Class
    NullableBehavior Enumeration
   [Expand]NullableBehaviorAttribute Class
   [Expand]NullValueAttribute Class
   [Expand]ObjectChangeEventArgs Class
    ObjectChangeEventHandler Delegate
    ObjectChangeReason Enumeration
   [Expand]ObjectManipulationEventArgs Class
    ObjectManipulationEventHandler Delegate
   [Expand]ObjectsByKeyQuery Class
   [Expand]ObjectsManipulationEventArgs Class
    ObjectsManipulationEventHandler Delegate
   [Expand]ObjectsQuery Class
   [Expand]ObjectStubsQuery Class
   [Expand]OptimisticLockingAttribute Class
    OptimisticLockingBehavior Enumeration
   [Expand]OptimisticLockingIgnoredAttribute Class
    OptimisticLockingReadBehavior Enumeration
   [Expand]OptimisticLockingReadBehaviorAttribute Class
    OptimisticLockingReadMergeBehavior Enumeration
   [Expand]PersistentAliasAttribute Class
   [Expand]PersistentAttribute Class
   [Expand]PersistentBase Class
    PersistentCriteriaEvaluationBehavior Enumeration
   [Expand]ResolveSessionEventArgs Class
    ResolveSessionEventHandler Delegate
   [Expand]SchemaInitEventArgs Class
    SchemaInitEventHandler Delegate
   [Expand]SerializableObjectLayer Class
   [Expand]SerializableObjectLayerClient Class
    ServerExceptionThrownAction Enumeration
   [Expand]ServerExceptionThrownEventArgs Class
    ServerExceptionThrownEventHandler Delegate
   [Expand]ServerViewPropertiesCollection Class
   [Expand]ServerViewProperty Class
   [Collapse]Session Class
     Session Members
    [Expand]Session Constructor
    [Collapse]Session Properties
      AutoCreateOption Property
      CacheBehavior Property
      CaseSensitive Property
      Connection Property
      ConnectionString Property
      DataLayer Property
      DefaultSession Property
      Dictionary Property
      IdentityMapBehavior Property
      InTransaction Property
      InTransactionMode Property
      IsConnected Property
      IsObjectModifiedOnNonPersistentPropertyChange Property
      IsObjectsLoading Property
      IsObjectsSaving Property
      LockingOption Property
      ObjectLayer Property
      ObjectsSavedInCurrentTransaction Property
      OptimisticLockingReadBehavior Property
      SuppressThrowingAssociationCollectionWithDisabledLoading Property
      TrackingChanges Property
      TrackPropertiesModifications Property
      TypesManager Property
    [Expand]Session Events
    [Expand]Session Methods
   [Expand]SessionManipulationEventArgs Class
    SessionManipulationEventHandler Delegate
   [Expand]SessionObjectLayer Class
   [Expand]SessionOperationFailEventArgs Class
    SessionOperationFailEventHandler Delegate
   [Expand]SimpleDataLayer Class
   [Expand]SimpleObjectLayer Class
   [Expand]SizeAttribute Class
   [Expand]SkipCheckForFeedsAttribute Class
    SortDirection Enumeration
   [Expand]SortingCollection Class
   [Expand]StreamAttribute Class
   [Expand]ThreadSafeDataLayer Class
   [Expand]UnitOfWork Class
   [Expand]ValueConverterAttribute Class
   [Expand]ViewPropertiesCollection Class
   [Expand]ViewProperty Class
   [Expand]ViewRecord Class
   [Expand]VisibleAttribute Class
   [Expand]XPBaseCollection Class
   [Expand]XPBaseObject Class
   [Expand]XPBindingSource Class
   [Expand]XPClassInfoStub Class
   [Expand]XPCollection Class
   [Expand]XPCollection<T> Class
   [Expand]XPCollectionChangedEventArgs Class
    XPCollectionChangedEventHandler Delegate
    XPCollectionChangedType Enumeration
   [Expand]XPCursor Class
   [Expand]XPCustomObject Class
   [Expand]XPDataObject Class
   [Expand]XPDataView Class
   [Expand]XPDelayedProperty Class
   [Expand]XPDictionaryStub Class
   [Expand]XPInstantFeedbackSource Class
   [Expand]XPInstantFeedbackView Class
   [Expand]XPLiteObject Class
   [Expand]XPObject Class
   [Expand]XPObjectSource Class
   [Expand]XPObjectSourcePropertiesCollection Class
   [Expand]XPObjectSourceProperty Class
   [Expand]XPObjectSourceRecord Class
   [Expand]XPObjectStub Class
   [Expand]XPObjectStubCollection Class
   [Expand]XPObjectType Class
   [Expand]XpoDataSource Class
   [Expand]XpoDataSourceInsertedEventArgs Class
    XpoDataSourceInsertedEventHandler Delegate
   [Expand]XpoDefault Class
   [Expand]XPPageSelector Class
   [Expand]XPQuery<T> Class
   [Expand]XPQueryBase Class
   [Expand]XPQueryExtensions Class
   [Expand]XPServerCollectionSource Class
   [Expand]XPServerModeView Class
   [Expand]XPView Class
   [Expand]XPWeakReference Class
  [Expand]DevExpress.Xpo.DB
  [Expand]DevExpress.Xpo.DB.Helpers
  [Expand]DevExpress.Xpo.Exceptions
  [Expand]DevExpress.Xpo.Helpers
  [Expand]DevExpress.Xpo.Metadata
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Session.TrackPropertiesModifications Property

Specifies whether or not the current Session tracks persistent object property modifications.

Namespace:DevExpress.Xpo
Assembly:DevExpress.Xpo.v19.1.dll

Expanded Syntax

Property value

Type: Boolean
true, if the Session tracks persistent object property modifications; otherwise, false.
The default is false.

Expanded Remarks

The default value of the TrackPropertiesModifications property is taken from the static XpoDefault.TrackPropertiesModifications property.

When the TrackPropertiesModifications is set to true, field-level optimistic locking is enabled. Its behavior can be configured via the OptimisticLockingAttribute attribute and the OptimisticLockingReadBehavior property.

You can enable/disable property tracking for each persistent type individually by applying the OptimisticLockingReadBehaviorAttribute attribute. This attribute overrides the TrackPropertiesModifications setting of the Session. To disable optimistic locking for a specific persistent property, apply the OptimisticLockingIgnoredAttribute to this property.

Properties Implementation Requirements

To support this functionality, persistent properties should be implemented in a specific manner. If you implement your business model in code, use either the SetPropertyValue or OnChanged method in persistent property setters. These methods have several overloads. Use the overloads that take both the old and new property values:

If you use the Data Model Designer to create the data model, then you do not need to worry about implementing persistent properties. Designer automatically declares persistent properties in the proper manner.

Expanded See Also

Is this topic helpful?​​​​​​​