To change the contents of the store, you must use a transaction. You can also use the UndoManager class with a transaction to undo and redo changes.
注意
The Domain-Specific Language Designer uses a transaction each time that a language user changes a model's store.
Each transaction has properties that you can use to check whether the transaction is active, whether it is nested, what its name is, and so on.
A transaction can be nested within another transaction. You can apply rules and events that determine how the nested transaction is used with its parent transaction. For example, you might want the nested transaction to wait until the changes in another nested transaction or a parent transaction are committed.