OnUpdate is called just before the onbject is saved to database. Here you can do things needed on every save operation.
You can't create new objects from within then OnUpdate action. That will leave the newly created object unsaved.
For example, in the method body for OnUpdate set this ocl:
if self.existing then -- This avoids touching the object if it has been deleted self.ChangeTime:=DateTime.Now; false else false endif