R29729 EntitySetting - Is Aggregate Root
Code | R29729 |
Entity | Systems.Core.EntitySettings Entity |
Name | IsAggregateRoot |
Attribute | TrackChangesLevel |
Layer | Back-End |
Events | Commit |
Priority | Normal |
Modify | NO |
Applicable Legislations | ALL // no condition needed |
Action | If (TrackChangesLevel != DoNotTrackChanges)
, validate that GetAggregateRoot() = null |
Description | Currently, changes can be tracked only for the whole aggregate (for more information, see
Aggregates). In order to start |
tracking changes for a particular aggregate we should set a 'Track Changes Level' other than
'0 - Do Not Track Changes' in the definition of the entity that is an 'Aggregate Root'.
For this reason, the current rule validates that when we are setting a 'Track Changes Level' other than '0 - Do Not Track Changes' we are editing exactly the root of the aggregate. |
Message | The 'Track Changes Level' field in the definition of entity '{EntityName}' has an invalid
value. The only valid value for this entity is '0 - Do Not Track Changes'.
Track changes could be activated only for the entity that is a root of the aggregate. The aggregate root of the current entity is '{AggregateRoot.EntityName}'. |
Introduced In Version | 2019.1 |
Revocable | NO |
* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.