Save options used when saving an entity record. Provides fine-grained control over the save operation including validation, action execution, and conflict detection.

Constructors

Properties

IgnoreDirtyState: boolean = false

If set to true, the record will be saved to the database even if nothing is detected to be "dirty" or changed since the prior load.

ReplayOnly?: boolean = false

When set to true, the save operation will BYPASS Validate() and the actual process of saving changes to the database but WILL invoke any associated actions (AI Actions, Entity Actions, etc...) Subclasses can also override the Save() method to provide custom logic that will be invoked when ReplayOnly is set to true

SkipAsyncValidation?: boolean = undefined

When set to true, the entity will skip the asynchronous ValidateAsync() method during save. This is an advanced setting and should only be used when you are sure the async validation is not needed. The default behavior is to run the async validation and the default value is undefined. Also, you can set an Entity level default in a BaseEntity subclass by overriding the DefaultSkipAsyncValidation() getter property.

See

BaseEntity.DefaultSkipAsyncValidation

SkipEntityAIActions?: boolean = false

If set to true, an AI actions associated with the entity will be skipped during the save operation

SkipEntityActions?: boolean = false

If set to true, any Entity Actions associated with invocation types of Create or Update will be skipped during the save operation

SkipOldValuesCheck?: boolean = false

Setting this to true means that the system will not look for inconsistency between the state of the record at the time it was loaded and the current database version of the record. This is normally on because it is a good way to prevent overwriting changes made by other users that happened after your version of the record was loaded. However, in some cases, you may want to skip this check, such as when you are updating a record that you know has not been changed by anyone else since you loaded it. In that case, you can set this property to true to skip the check which will be more efficient.

  • IMPORTANT: This is only used for client-side providers. On server-side providers, this check never occurs because server side operations are as up to date as this check would yield.