An
AfterSaveEvent is created after a database operation on an item. The
PK of the item is recorded,
and the type as well. There are three types supported:
UPDATE,
REMOVE, and
CREATE.
Rules to create an AfterSaveEvent when transaction is used and multiple operations have been executed on the
SAME item(Note: all of the operations are executed between one BEGIN and COMMIT database action):
- for
CREATE: create + update(*)
- for
UPDATE: update(+)
- for
REMOVE: update(*) + remove
NO AfterSaveEvent will be created when the transaction rolls back as well as under the following situation:
- create + update(*) + remove
If there is no active transaction, each database operation on the item needs to be recorded so that an
AfterSaveEvent will be created.